+ nb_header_segs +=
+ sfc_dp_tx_pkt_extra_hdr_segs(&m_seg,
+ &header_len_remaining);
+
+ if (unlikely(nb_header_segs > max_nb_header_segs)) {
+ /*
+ * The number of header segments is too large.
+ *
+ * If TSO is requested and if the datapath supports
+ * linearisation of TSO headers, allow the packet
+ * to proceed with additional checks below.
+ * Otherwise, throw an error.
+ */
+ if ((m->ol_flags & PKT_TX_TCP_SEG) == 0 ||
+ tso_bounce_buffer_len == 0)
+ return EINVAL;
+ }
+ }
+
+ if (m->ol_flags & PKT_TX_TCP_SEG) {