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 - pi->ipi_tcp_hlen; in ixgbe_tx_ctx_setup()
109 mss_l4len_idx |= (pi->ipi_tso_segsz << IXGBE_ADVTXD_MSS_SHIFT); in ixgbe_tx_ctx_setup()
110 mss_l4len_idx |= (pi->ipi_tcp_hlen << IXGBE_ADVTXD_L4LEN_SHIFT); in ixgbe_tx_ctx_setup()
115 if (pi->ipi_flags & IPI_TX_IPV4) { in ixgbe_tx_ctx_setup()
118 if (pi->ipi_csum_flags & (CSUM_IP|CSUM_TSO)) in ixgbe_tx_ctx_setup()
120 } else if (pi->ipi_flags & IPI_TX_IPV6) in ixgbe_tx_ctx_setup()
125 vlan_macip_lens |= pi->ipi_ip_hlen; in ixgbe_tx_ctx_setup()
127 switch (pi->ipi_ipproto) { in ixgbe_tx_ctx_setup()
129 if (pi->ipi_csum_flags & (CSUM_IP_TCP | CSUM_IP6_TCP | CSUM_TSO)) in ixgbe_tx_ctx_setup()
135 if (pi->ipi_csum_flags & (CSUM_IP_UDP | CSUM_IP6_UDP)) in ixgbe_tx_ctx_setup()
141 if (pi->ipi_csum_flags & (CSUM_IP_SCTP | CSUM_IP6_SCTP)) in ixgbe_tx_ctx_setup()
169 ixgbe_isc_txd_encap(void *arg, if_pkt_info_t pi) in ixgbe_isc_txd_encap() argument
173 struct ix_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx]; in ixgbe_isc_txd_encap()
175 int nsegs = pi->ipi_nsegs; in ixgbe_isc_txd_encap()
176 bus_dma_segment_t *segs = pi->ipi_segs; in ixgbe_isc_txd_encap()
186 if (pi->ipi_mflags & M_VLANTAG) in ixgbe_isc_txd_encap()
189 i = first = pi->ipi_pidx; in ixgbe_isc_txd_encap()
190 flags = (pi->ipi_flags & IPI_TX_INTR) ? IXGBE_TXD_CMD_RS : 0; in ixgbe_isc_txd_encap()
194 if ((pi->ipi_csum_flags & CSUM_OFFLOAD) || in ixgbe_isc_txd_encap()
196 pi->ipi_vtag) { in ixgbe_isc_txd_encap()
201 olinfo_status = ixgbe_tx_ctx_setup(TXD, pi); in ixgbe_isc_txd_encap()
202 if (pi->ipi_csum_flags & CSUM_TSO) { in ixgbe_isc_txd_encap()
211 olinfo_status = pi->ipi_len << IXGBE_ADVTXD_PAYLEN_SHIFT; in ixgbe_isc_txd_encap()
238 txr->bytes += pi->ipi_len; in ixgbe_isc_txd_encap()
239 pi->ipi_new_pidx = i; in ixgbe_isc_txd_encap()