Lines Matching refs:pi

85 igb_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len,  in igb_tso_setup()  argument
94 switch(pi->ipi_etype) { in igb_tso_setup()
105 __func__, ntohs(pi->ipi_etype)); in igb_tso_setup()
109 TXD = (struct e1000_adv_tx_context_desc *)&txr->tx_base[pi->ipi_pidx]; in igb_tso_setup()
112 paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - in igb_tso_setup()
113 pi->ipi_tcp_hlen; in igb_tso_setup()
116 if (pi->ipi_mflags & M_VLANTAG) { in igb_tso_setup()
117 vlan_macip_lens |= (pi->ipi_vtag << E1000_ADVTXD_VLAN_SHIFT); in igb_tso_setup()
120 vlan_macip_lens |= pi->ipi_ehdrlen << E1000_ADVTXD_MACLEN_SHIFT; in igb_tso_setup()
121 vlan_macip_lens |= pi->ipi_ip_hlen; in igb_tso_setup()
130 mss_l4len_idx |= (pi->ipi_tso_segsz << E1000_ADVTXD_MSS_SHIFT); in igb_tso_setup()
131 mss_l4len_idx |= (pi->ipi_tcp_hlen << E1000_ADVTXD_L4LEN_SHIFT); in igb_tso_setup()
151 igb_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, in igb_tx_ctx_setup() argument
161 if (pi->ipi_csum_flags & CSUM_TSO) in igb_tx_ctx_setup()
162 return (igb_tso_setup(txr, pi, cmd_type_len, olinfo_status)); in igb_tx_ctx_setup()
165 *olinfo_status |= pi->ipi_len << E1000_ADVTXD_PAYLEN_SHIFT; in igb_tx_ctx_setup()
168 TXD = (struct e1000_adv_tx_context_desc *)&txr->tx_base[pi->ipi_pidx]; in igb_tx_ctx_setup()
175 if (pi->ipi_mflags & M_VLANTAG) { in igb_tx_ctx_setup()
176 vlan_macip_lens |= (pi->ipi_vtag << E1000_ADVTXD_VLAN_SHIFT); in igb_tx_ctx_setup()
177 } else if ((pi->ipi_csum_flags & IGB_CSUM_OFFLOAD) == 0) { in igb_tx_ctx_setup()
182 vlan_macip_lens |= pi->ipi_ehdrlen << E1000_ADVTXD_MACLEN_SHIFT; in igb_tx_ctx_setup()
184 switch(pi->ipi_etype) { in igb_tx_ctx_setup()
195 vlan_macip_lens |= pi->ipi_ip_hlen; in igb_tx_ctx_setup()
198 switch (pi->ipi_ipproto) { in igb_tx_ctx_setup()
200 if (pi->ipi_csum_flags & (CSUM_IP_TCP | CSUM_IP6_TCP)) { in igb_tx_ctx_setup()
206 if (pi->ipi_csum_flags & (CSUM_IP_UDP | CSUM_IP6_UDP)) { in igb_tx_ctx_setup()
212 if (pi->ipi_csum_flags & (CSUM_IP_SCTP | CSUM_IP6_SCTP)) { in igb_tx_ctx_setup()
235 igb_isc_txd_encap(void *arg, if_pkt_info_t pi) in igb_isc_txd_encap() argument
239 struct em_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx]; in igb_isc_txd_encap()
241 int nsegs = pi->ipi_nsegs; in igb_isc_txd_encap()
242 bus_dma_segment_t *segs = pi->ipi_segs; in igb_isc_txd_encap()
253 if (pi->ipi_mflags & M_VLANTAG) in igb_isc_txd_encap()
256 i = pi->ipi_pidx; in igb_isc_txd_encap()
258 txd_flags = pi->ipi_flags & IPI_TX_INTR ? E1000_ADVTXD_DCMD_RS : 0; in igb_isc_txd_encap()
260 i += igb_tx_ctx_setup(txr, pi, &cmd_type_len, &olinfo_status); in igb_isc_txd_encap()
292 pi->ipi_new_pidx = i; in igb_isc_txd_encap()
295 txr->tx_bytes += pi->ipi_len; in igb_isc_txd_encap()