Lines Matching full:pi

126 igc_tso_setup(struct tx_ring *txr, if_pkt_info_t pi, uint32_t *cmd_type_len,  in igc_tso_setup()  argument
134 switch(pi->ipi_etype) { in igc_tso_setup()
145 __func__, ntohs(pi->ipi_etype)); in igc_tso_setup()
149 TXD = (struct igc_adv_tx_context_desc *) &txr->tx_base[pi->ipi_pidx]; in igc_tso_setup()
152 paylen = pi->ipi_len - pi->ipi_ehdrlen - pi->ipi_ip_hlen - in igc_tso_setup()
153 pi->ipi_tcp_hlen; in igc_tso_setup()
156 if (pi->ipi_mflags & M_VLANTAG) { in igc_tso_setup()
157 vlan_macip_lens |= (pi->ipi_vtag << IGC_ADVTXD_VLAN_SHIFT); in igc_tso_setup()
160 vlan_macip_lens |= pi->ipi_ehdrlen << IGC_ADVTXD_MACLEN_SHIFT; in igc_tso_setup()
161 vlan_macip_lens |= pi->ipi_ip_hlen; in igc_tso_setup()
170 mss_l4len_idx |= (pi->ipi_tso_segsz << IGC_ADVTXD_MSS_SHIFT); in igc_tso_setup()
171 mss_l4len_idx |= (pi->ipi_tcp_hlen << IGC_ADVTXD_L4LEN_SHIFT); in igc_tso_setup()
188 igc_tx_ctx_setup(struct tx_ring *txr, if_pkt_info_t pi, in igc_tx_ctx_setup() argument
197 if (pi->ipi_csum_flags & CSUM_TSO) in igc_tx_ctx_setup()
198 return (igc_tso_setup(txr, pi, cmd_type_len, olinfo_status)); in igc_tx_ctx_setup()
201 *olinfo_status |= pi->ipi_len << IGC_ADVTXD_PAYLEN_SHIFT; in igc_tx_ctx_setup()
204 TXD = (struct igc_adv_tx_context_desc *) &txr->tx_base[pi->ipi_pidx]; in igc_tx_ctx_setup()
211 if (pi->ipi_mflags & M_VLANTAG) { in igc_tx_ctx_setup()
212 vlan_macip_lens |= (pi->ipi_vtag << IGC_ADVTXD_VLAN_SHIFT); in igc_tx_ctx_setup()
213 } else if ((pi->ipi_csum_flags & IGC_CSUM_OFFLOAD) == 0) { in igc_tx_ctx_setup()
218 vlan_macip_lens |= pi->ipi_ehdrlen << IGC_ADVTXD_MACLEN_SHIFT; in igc_tx_ctx_setup()
220 switch(pi->ipi_etype) { in igc_tx_ctx_setup()
231 vlan_macip_lens |= pi->ipi_ip_hlen; in igc_tx_ctx_setup()
234 switch (pi->ipi_ipproto) { in igc_tx_ctx_setup()
236 if (pi->ipi_csum_flags & (CSUM_IP_TCP | CSUM_IP6_TCP)) { in igc_tx_ctx_setup()
242 if (pi->ipi_csum_flags & (CSUM_IP_UDP | CSUM_IP6_UDP)) { in igc_tx_ctx_setup()
248 if (pi->ipi_csum_flags & (CSUM_IP_SCTP | CSUM_IP6_SCTP)) { in igc_tx_ctx_setup()
267 igc_isc_txd_encap(void *arg, if_pkt_info_t pi) in igc_isc_txd_encap() argument
271 struct igc_tx_queue *que = &sc->tx_queues[pi->ipi_qsidx]; in igc_isc_txd_encap()
273 int nsegs = pi->ipi_nsegs; in igc_isc_txd_encap()
274 bus_dma_segment_t *segs = pi->ipi_segs; in igc_isc_txd_encap()
285 if (pi->ipi_mflags & M_VLANTAG) in igc_isc_txd_encap()
288 i = pi->ipi_pidx; in igc_isc_txd_encap()
290 txd_flags = pi->ipi_flags & IPI_TX_INTR ? IGC_ADVTXD_DCMD_RS : 0; in igc_isc_txd_encap()
292 i += igc_tx_ctx_setup(txr, pi, &cmd_type_len, &olinfo_status); in igc_isc_txd_encap()
320 pi->ipi_new_pidx = i; in igc_isc_txd_encap()
323 txr->tx_bytes += pi->ipi_len; in igc_isc_txd_encap()