Lines Matching refs:pi
79 ixgbe_tx_ctx_setup(struct ixgbe_adv_tx_context_desc *TXD, if_pkt_info_t pi) in ixgbe_tx_ctx_setup() argument
88 vlan_macip_lens |= (htole16(pi->ipi_vtag) << IXGBE_ADVTXD_VLAN_SHIFT); in ixgbe_tx_ctx_setup()
97 if (pi->ipi_ehdrlen == 0) { in ixgbe_tx_ctx_setup()
99 ehdrlen += (pi->ipi_vtag != 0) ? ETHER_VLAN_ENCAP_LEN : 0; in ixgbe_tx_ctx_setup()
101 ehdrlen = pi->ipi_ehdrlen; in ixgbe_tx_ctx_setup()
104 pktlen = pi->ipi_len; in ixgbe_tx_ctx_setup()
106 if (pi->ipi_csum_flags & CSUM_TSO) { in ixgbe_tx_ctx_setup()
108 pktlen = pi->ipi_len - ehdrlen - pi->ipi_ip_hlen - in ixgbe_tx_ctx_setup()
109 pi->ipi_tcp_hlen; in ixgbe_tx_ctx_setup()
111 (pi->ipi_tso_segsz << IXGBE_ADVTXD_MSS_SHIFT); in ixgbe_tx_ctx_setup()
113 (pi->ipi_tcp_hlen << IXGBE_ADVTXD_L4LEN_SHIFT); in ixgbe_tx_ctx_setup()
118 if (pi->ipi_flags & IPI_TX_IPV4) { in ixgbe_tx_ctx_setup()
121 if (pi->ipi_csum_flags & (CSUM_IP|CSUM_TSO)) in ixgbe_tx_ctx_setup()
123 } else if (pi->ipi_flags & IPI_TX_IPV6) in ixgbe_tx_ctx_setup()
128 vlan_macip_lens |= pi->ipi_ip_hlen; in ixgbe_tx_ctx_setup()
130 switch (pi->ipi_ipproto) { in ixgbe_tx_ctx_setup()
132 if (pi->ipi_csum_flags & in ixgbe_tx_ctx_setup()
139 if (pi->ipi_csum_flags & (CSUM_IP_UDP | CSUM_IP6_UDP)) in ixgbe_tx_ctx_setup()
145 if (pi->ipi_csum_flags & (CSUM_IP_SCTP | CSUM_IP6_SCTP)) in ixgbe_tx_ctx_setup()
173 ixgbe_isc_txd_encap(void *arg, if_pkt_info_t pi) in ixgbe_isc_txd_encap() argument
177 struct ix_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx]; in ixgbe_isc_txd_encap()
179 int nsegs = pi->ipi_nsegs; in ixgbe_isc_txd_encap()
180 bus_dma_segment_t *segs = pi->ipi_segs; in ixgbe_isc_txd_encap()
190 if (pi->ipi_mflags & M_VLANTAG) in ixgbe_isc_txd_encap()
193 i = first = pi->ipi_pidx; in ixgbe_isc_txd_encap()
194 flags = (pi->ipi_flags & IPI_TX_INTR) ? IXGBE_TXD_CMD_RS : 0; in ixgbe_isc_txd_encap()
198 if ((pi->ipi_csum_flags & CSUM_OFFLOAD) || in ixgbe_isc_txd_encap()
200 pi->ipi_vtag) { in ixgbe_isc_txd_encap()
205 olinfo_status = ixgbe_tx_ctx_setup(TXD, pi); in ixgbe_isc_txd_encap()
206 if (pi->ipi_csum_flags & CSUM_TSO) { in ixgbe_isc_txd_encap()
215 olinfo_status = pi->ipi_len << IXGBE_ADVTXD_PAYLEN_SHIFT; in ixgbe_isc_txd_encap()
242 txr->bytes += pi->ipi_len; in ixgbe_isc_txd_encap()
243 pi->ipi_new_pidx = i; in ixgbe_isc_txd_encap()