Lines Matching refs:sgt_buf

867 	void *sgt_buf = NULL;  in dpaa2_eth_sgt_get()  local
875 sgt_buf = napi_alloc_frag_align(sgt_buf_size, DPAA2_ETH_TX_BUF_ALIGN); in dpaa2_eth_sgt_get()
877 sgt_buf = sgt_cache->buf[--sgt_cache->count]; in dpaa2_eth_sgt_get()
878 if (!sgt_buf) in dpaa2_eth_sgt_get()
881 memset(sgt_buf, 0, sgt_buf_size); in dpaa2_eth_sgt_get()
883 return sgt_buf; in dpaa2_eth_sgt_get()
886 void dpaa2_eth_sgt_recycle(struct dpaa2_eth_priv *priv, void *sgt_buf) in dpaa2_eth_sgt_recycle() argument
892 skb_free_frag(sgt_buf); in dpaa2_eth_sgt_recycle()
894 sgt_cache->buf[sgt_cache->count++] = sgt_buf; in dpaa2_eth_sgt_recycle()
904 void *sgt_buf = NULL; in dpaa2_eth_build_sg_fd() local
942 sgt_buf = dpaa2_eth_sgt_get(priv); in dpaa2_eth_build_sg_fd()
943 if (unlikely(!sgt_buf)) { in dpaa2_eth_build_sg_fd()
948 sgt = (struct dpaa2_sg_entry *)(sgt_buf + priv->tx_data_offset); in dpaa2_eth_build_sg_fd()
968 *swa_addr = (void *)sgt_buf; in dpaa2_eth_build_sg_fd()
969 swa = (struct dpaa2_eth_swa *)sgt_buf; in dpaa2_eth_build_sg_fd()
977 addr = dma_map_single(dev, sgt_buf, sgt_buf_size, DMA_BIDIRECTIONAL); in dpaa2_eth_build_sg_fd()
992 dpaa2_eth_sgt_recycle(priv, sgt_buf); in dpaa2_eth_build_sg_fd()
1015 void *sgt_buf = NULL; in dpaa2_eth_build_sg_fd_single_buf() local
1021 sgt_buf = dpaa2_eth_sgt_get(priv); in dpaa2_eth_build_sg_fd_single_buf()
1022 if (unlikely(!sgt_buf)) in dpaa2_eth_build_sg_fd_single_buf()
1024 sgt = (struct dpaa2_sg_entry *)(sgt_buf + priv->tx_data_offset); in dpaa2_eth_build_sg_fd_single_buf()
1038 *swa_addr = (void *)sgt_buf; in dpaa2_eth_build_sg_fd_single_buf()
1039 swa = (struct dpaa2_eth_swa *)sgt_buf; in dpaa2_eth_build_sg_fd_single_buf()
1045 sgt_addr = dma_map_single(dev, sgt_buf, sgt_buf_size, DMA_BIDIRECTIONAL); in dpaa2_eth_build_sg_fd_single_buf()
1063 dpaa2_eth_sgt_recycle(priv, sgt_buf); in dpaa2_eth_build_sg_fd_single_buf()
1270 void *sgt_buf; in dpaa2_eth_build_gso_fd() local
1279 sgt_buf = dpaa2_eth_sgt_get(priv); in dpaa2_eth_build_gso_fd()
1280 if (unlikely(!sgt_buf)) { in dpaa2_eth_build_gso_fd()
1285 sgt = (struct dpaa2_sg_entry *)(sgt_buf + priv->tx_data_offset); in dpaa2_eth_build_gso_fd()
1340 swa = (struct dpaa2_eth_swa *)sgt_buf; in dpaa2_eth_build_gso_fd()
1348 sgt_addr = dma_map_single(dev, sgt_buf, sgt_buf_size, DMA_BIDIRECTIONAL); in dpaa2_eth_build_gso_fd()
1376 sgt = (struct dpaa2_sg_entry *)(sgt_buf + priv->tx_data_offset); in dpaa2_eth_build_gso_fd()
1386 dpaa2_eth_sgt_recycle(priv, sgt_buf); in dpaa2_eth_build_gso_fd()