Lines Matching refs:pi
55 static int ixl_isc_txd_encap(void *arg, if_pkt_info_t pi);
156 ixl_tso_detect_sparse(bus_dma_segment_t *segs, int nsegs, if_pkt_info_t pi) in ixl_tso_detect_sparse() argument
162 segsz = pi->ipi_tso_segsz; in ixl_tso_detect_sparse()
165 hlen = pi->ipi_ehdrlen + pi->ipi_ip_hlen + pi->ipi_tcp_hlen; in ixl_tso_detect_sparse()
166 tsolen = pi->ipi_len - hlen; in ixl_tso_detect_sparse()
187 segsz = pi->ipi_tso_segsz; in ixl_tso_detect_sparse()
222 if_pkt_info_t pi, u32 *cmd, u32 *off) in ixl_tx_setup_offload() argument
224 switch (pi->ipi_etype) { in ixl_tx_setup_offload()
227 if (pi->ipi_csum_flags & IXL_CSUM_IPV4) in ixl_tx_setup_offload()
242 *off |= (pi->ipi_ehdrlen >> 1) << I40E_TX_DESC_LENGTH_MACLEN_SHIFT; in ixl_tx_setup_offload()
243 *off |= (pi->ipi_ip_hlen >> 2) << I40E_TX_DESC_LENGTH_IPLEN_SHIFT; in ixl_tx_setup_offload()
245 switch (pi->ipi_ipproto) { in ixl_tx_setup_offload()
247 if (pi->ipi_csum_flags & IXL_CSUM_TCP) { in ixl_tx_setup_offload()
249 *off |= (pi->ipi_tcp_hlen >> 2) << in ixl_tx_setup_offload()
252 MPASS(pi->ipi_tcp_hlen != 0); in ixl_tx_setup_offload()
256 if (pi->ipi_csum_flags & IXL_CSUM_UDP) { in ixl_tx_setup_offload()
263 if (pi->ipi_csum_flags & IXL_CSUM_SCTP) { in ixl_tx_setup_offload()
280 ixl_tso_setup(struct tx_ring *txr, if_pkt_info_t pi) in ixl_tso_setup() argument
288 idx = pi->ipi_pidx; in ixl_tso_setup()
290 total_hdr_len = pi->ipi_ehdrlen + pi->ipi_ip_hlen + pi->ipi_tcp_hlen; in ixl_tso_setup()
291 tsolen = pi->ipi_len - total_hdr_len; in ixl_tso_setup()
300 if (pi->ipi_tso_segsz < IXL_MIN_TSO_MSS) { in ixl_tso_setup()
302 pi->ipi_tso_segsz = IXL_MIN_TSO_MSS; in ixl_tso_setup()
304 mss = pi->ipi_tso_segsz; in ixl_tso_setup()
309 MPASS(pi->ipi_ehdrlen != 0); in ixl_tso_setup()
310 MPASS(pi->ipi_ip_hlen != 0); in ixl_tso_setup()
338 ixl_isc_txd_encap(void *arg, if_pkt_info_t pi) in ixl_isc_txd_encap() argument
342 struct ixl_tx_queue *que = &vsi->tx_queues[pi->ipi_qsidx]; in ixl_isc_txd_encap()
344 int nsegs = pi->ipi_nsegs; in ixl_isc_txd_encap()
345 bus_dma_segment_t *segs = pi->ipi_segs; in ixl_isc_txd_encap()
351 i = pi->ipi_pidx; in ixl_isc_txd_encap()
353 tx_intr = (pi->ipi_flags & IPI_TX_INTR); in ixl_isc_txd_encap()
356 if (pi->ipi_csum_flags & CSUM_OFFLOAD) { in ixl_isc_txd_encap()
358 if (pi->ipi_csum_flags & CSUM_TSO) { in ixl_isc_txd_encap()
360 if (ixl_tso_detect_sparse(segs, nsegs, pi)) in ixl_isc_txd_encap()
362 i = ixl_tso_setup(txr, pi); in ixl_isc_txd_encap()
364 ixl_tx_setup_offload(que, pi, &cmd, &off); in ixl_isc_txd_encap()
366 if (pi->ipi_mflags & M_VLANTAG) in ixl_isc_txd_encap()
372 MPASS(pi->ipi_len >= IXL_MIN_FRAME); in ixl_isc_txd_encap()
374 if (!(pi->ipi_csum_flags & CSUM_TSO)) in ixl_isc_txd_encap()
375 MPASS(pi->ipi_len <= IXL_MAX_FRAME); in ixl_isc_txd_encap()
392 | ((u64)htole16(pi->ipi_vtag) << I40E_TXD_QW1_L2TAG1_SHIFT)); in ixl_isc_txd_encap()
407 pi->ipi_new_pidx = i; in ixl_isc_txd_encap()