Lines Matching refs:swa
285 struct dpaa2_eth_swa *swa; in dpaa2_eth_free_bufs() local
298 swa = (struct dpaa2_eth_swa *) in dpaa2_eth_free_bufs()
300 xdp_buff = swa->xsk.xdp_buff; in dpaa2_eth_free_bufs()
913 struct dpaa2_eth_swa *swa; in dpaa2_eth_build_sg_fd() local
969 swa = (struct dpaa2_eth_swa *)sgt_buf; in dpaa2_eth_build_sg_fd()
970 swa->type = DPAA2_ETH_SWA_SG; in dpaa2_eth_build_sg_fd()
971 swa->sg.skb = skb; in dpaa2_eth_build_sg_fd()
972 swa->sg.scl = scl; in dpaa2_eth_build_sg_fd()
973 swa->sg.num_sg = num_sg; in dpaa2_eth_build_sg_fd()
974 swa->sg.sgt_size = sgt_buf_size; in dpaa2_eth_build_sg_fd()
1013 struct dpaa2_eth_swa *swa; in dpaa2_eth_build_sg_fd_single_buf() local
1039 swa = (struct dpaa2_eth_swa *)sgt_buf; in dpaa2_eth_build_sg_fd_single_buf()
1040 swa->type = DPAA2_ETH_SWA_SINGLE; in dpaa2_eth_build_sg_fd_single_buf()
1041 swa->single.skb = skb; in dpaa2_eth_build_sg_fd_single_buf()
1042 swa->single.sgt_size = sgt_buf_size; in dpaa2_eth_build_sg_fd_single_buf()
1076 struct dpaa2_eth_swa *swa; in dpaa2_eth_build_single_fd() local
1092 swa = (struct dpaa2_eth_swa *)buffer_start; in dpaa2_eth_build_single_fd()
1093 swa->type = DPAA2_ETH_SWA_SINGLE; in dpaa2_eth_build_single_fd()
1094 swa->single.skb = skb; in dpaa2_eth_build_single_fd()
1128 struct dpaa2_eth_swa *swa; in dpaa2_eth_free_tx_fd() local
1138 swa = (struct dpaa2_eth_swa *)buffer_start; in dpaa2_eth_free_tx_fd()
1141 if (swa->type == DPAA2_ETH_SWA_SINGLE) { in dpaa2_eth_free_tx_fd()
1142 skb = swa->single.skb; in dpaa2_eth_free_tx_fd()
1150 WARN_ONCE(swa->type != DPAA2_ETH_SWA_XDP, "Wrong SWA type"); in dpaa2_eth_free_tx_fd()
1151 dma_unmap_single(dev, fd_addr, swa->xdp.dma_size, in dpaa2_eth_free_tx_fd()
1155 if (swa->type == DPAA2_ETH_SWA_SG) { in dpaa2_eth_free_tx_fd()
1156 skb = swa->sg.skb; in dpaa2_eth_free_tx_fd()
1159 dma_unmap_sg(dev, swa->sg.scl, swa->sg.num_sg, in dpaa2_eth_free_tx_fd()
1161 kfree(swa->sg.scl); in dpaa2_eth_free_tx_fd()
1164 dma_unmap_single(dev, fd_addr, swa->sg.sgt_size, in dpaa2_eth_free_tx_fd()
1166 } else if (swa->type == DPAA2_ETH_SWA_SW_TSO) { in dpaa2_eth_free_tx_fd()
1167 skb = swa->tso.skb; in dpaa2_eth_free_tx_fd()
1173 dma_unmap_single(dev, fd_addr, swa->tso.sgt_size, in dpaa2_eth_free_tx_fd()
1183 for (i = 1; i < swa->tso.num_sg; i++) in dpaa2_eth_free_tx_fd()
1187 if (!swa->tso.is_last_fd) in dpaa2_eth_free_tx_fd()
1189 } else if (swa->type == DPAA2_ETH_SWA_XSK) { in dpaa2_eth_free_tx_fd()
1191 dma_unmap_single(dev, fd_addr, swa->xsk.sgt_size, in dpaa2_eth_free_tx_fd()
1194 skb = swa->single.skb; in dpaa2_eth_free_tx_fd()
1197 dma_unmap_single(dev, fd_addr, swa->single.sgt_size, in dpaa2_eth_free_tx_fd()
1210 if (swa->type == DPAA2_ETH_SWA_XSK) { in dpaa2_eth_free_tx_fd()
1216 if (swa->type != DPAA2_ETH_SWA_XDP && in_napi) { in dpaa2_eth_free_tx_fd()
1221 if (swa->type == DPAA2_ETH_SWA_XDP) { in dpaa2_eth_free_tx_fd()
1222 xdp_return_frame(swa->xdp.xdpf); in dpaa2_eth_free_tx_fd()
1227 if (swa->type != DPAA2_ETH_SWA_SW_TSO) { in dpaa2_eth_free_tx_fd()
1264 struct dpaa2_eth_swa *swa; in dpaa2_eth_build_gso_fd() local
1340 swa = (struct dpaa2_eth_swa *)sgt_buf; in dpaa2_eth_build_gso_fd()
1341 swa->type = DPAA2_ETH_SWA_SW_TSO; in dpaa2_eth_build_gso_fd()
1342 swa->tso.skb = skb; in dpaa2_eth_build_gso_fd()
1343 swa->tso.num_sg = num_sge; in dpaa2_eth_build_gso_fd()
1344 swa->tso.sgt_size = sgt_buf_size; in dpaa2_eth_build_gso_fd()
1345 swa->tso.is_last_fd = total_len == 0 ? 1 : 0; in dpaa2_eth_build_gso_fd()
1408 void *swa = NULL; in __dpaa2_eth_tx() local
1438 err = dpaa2_eth_build_sg_fd(priv, skb, fd, &swa); in __dpaa2_eth_tx()
1443 err = dpaa2_eth_build_sg_fd_single_buf(priv, skb, fd, &swa); in __dpaa2_eth_tx()
1450 err = dpaa2_eth_build_single_fd(priv, skb, fd, &swa); in __dpaa2_eth_tx()
1459 if (swa && skb->cb[0]) in __dpaa2_eth_tx()
1460 dpaa2_eth_enable_tx_tstamp(priv, fd, swa, skb); in __dpaa2_eth_tx()
1682 struct dpaa2_eth_swa *swa; in dpaa2_eth_add_bufs() local
1726 swa = (struct dpaa2_eth_swa *)(xdp_buffs[i]->data_hard_start + in dpaa2_eth_add_bufs()
1728 swa->xsk.xdp_buff = xdp_buffs[i]; in dpaa2_eth_add_bufs()
2813 struct dpaa2_eth_swa *swa; in dpaa2_eth_xdp_create_fd() local
2834 swa = (struct dpaa2_eth_swa *)buffer_start; in dpaa2_eth_xdp_create_fd()
2836 swa->type = DPAA2_ETH_SWA_XDP; in dpaa2_eth_xdp_create_fd()
2837 swa->xdp.dma_size = xdpf->data + xdpf->len - buffer_start; in dpaa2_eth_xdp_create_fd()
2838 swa->xdp.xdpf = xdpf; in dpaa2_eth_xdp_create_fd()
2841 swa->xdp.dma_size, in dpaa2_eth_xdp_create_fd()