Skip to content

Commit 1b698fa

Browse files
LorenzoBianconiAlexei Starovoitov
authored andcommitted
xdp: Rename convert_to_xdp_frame in xdp_convert_buff_to_frame
In order to use standard 'xdp' prefix, rename convert_to_xdp_frame utility routine in xdp_convert_buff_to_frame and replace all the occurrences Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Link: https://lore.kernel.org/bpf/6344f739be0d1a08ab2b9607584c4d5478c8c083.1590698295.git.lorenzo@kernel.org
1 parent fc37987 commit 1b698fa

File tree

16 files changed

+21
-21
lines changed

16 files changed

+21
-21
lines changed

drivers/net/ethernet/amazon/ena/ena_netdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static int ena_xdp_tx_map_buff(struct ena_ring *xdp_ring,
263263
dma_addr_t dma = 0;
264264
u32 size;
265265

266-
tx_info->xdpf = convert_to_xdp_frame(xdp);
266+
tx_info->xdpf = xdp_convert_buff_to_frame(xdp);
267267
size = tx_info->xdpf->len;
268268
ena_buf = tx_info->bufs;
269269

drivers/net/ethernet/intel/i40e/i40e_txrx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2167,7 +2167,7 @@ static int i40e_xmit_xdp_ring(struct xdp_frame *xdpf,
21672167

21682168
int i40e_xmit_xdp_tx_ring(struct xdp_buff *xdp, struct i40e_ring *xdp_ring)
21692169
{
2170-
struct xdp_frame *xdpf = convert_to_xdp_frame(xdp);
2170+
struct xdp_frame *xdpf = xdp_convert_buff_to_frame(xdp);
21712171

21722172
if (unlikely(!xdpf))
21732173
return I40E_XDP_CONSUMED;

drivers/net/ethernet/intel/ice/ice_txrx_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ int ice_xmit_xdp_ring(void *data, u16 size, struct ice_ring *xdp_ring)
254254
*/
255255
int ice_xmit_xdp_buff(struct xdp_buff *xdp, struct ice_ring *xdp_ring)
256256
{
257-
struct xdp_frame *xdpf = convert_to_xdp_frame(xdp);
257+
struct xdp_frame *xdpf = xdp_convert_buff_to_frame(xdp);
258258

259259
if (unlikely(!xdpf))
260260
return ICE_XDP_CONSUMED;

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2215,7 +2215,7 @@ static struct sk_buff *ixgbe_run_xdp(struct ixgbe_adapter *adapter,
22152215
case XDP_PASS:
22162216
break;
22172217
case XDP_TX:
2218-
xdpf = convert_to_xdp_frame(xdp);
2218+
xdpf = xdp_convert_buff_to_frame(xdp);
22192219
if (unlikely(!xdpf)) {
22202220
result = IXGBE_XDP_CONSUMED;
22212221
break;

drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static int ixgbe_run_xdp_zc(struct ixgbe_adapter *adapter,
107107
case XDP_PASS:
108108
break;
109109
case XDP_TX:
110-
xdpf = convert_to_xdp_frame(xdp);
110+
xdpf = xdp_convert_buff_to_frame(xdp);
111111
if (unlikely(!xdpf)) {
112112
result = IXGBE_XDP_CONSUMED;
113113
break;

drivers/net/ethernet/marvell/mvneta.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2073,7 +2073,7 @@ mvneta_xdp_xmit_back(struct mvneta_port *pp, struct xdp_buff *xdp)
20732073
int cpu;
20742074
u32 ret;
20752075

2076-
xdpf = convert_to_xdp_frame(xdp);
2076+
xdpf = xdp_convert_buff_to_frame(xdp);
20772077
if (unlikely(!xdpf))
20782078
return MVNETA_XDP_DROPPED;
20792079

drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ mlx5e_xmit_xdp_buff(struct mlx5e_xdpsq *sq, struct mlx5e_rq *rq,
6464
struct xdp_frame *xdpf;
6565
dma_addr_t dma_addr;
6666

67-
xdpf = convert_to_xdp_frame(xdp);
67+
xdpf = xdp_convert_buff_to_frame(xdp);
6868
if (unlikely(!xdpf))
6969
return false;
7070

@@ -97,10 +97,10 @@ mlx5e_xmit_xdp_buff(struct mlx5e_xdpsq *sq, struct mlx5e_rq *rq,
9797
xdpi.frame.xdpf = xdpf;
9898
xdpi.frame.dma_addr = dma_addr;
9999
} else {
100-
/* Driver assumes that convert_to_xdp_frame returns an xdp_frame
101-
* that points to the same memory region as the original
102-
* xdp_buff. It allows to map the memory only once and to use
103-
* the DMA_BIDIRECTIONAL mode.
100+
/* Driver assumes that xdp_convert_buff_to_frame returns
101+
* an xdp_frame that points to the same memory region as
102+
* the original xdp_buff. It allows to map the memory only
103+
* once and to use the DMA_BIDIRECTIONAL mode.
104104
*/
105105

106106
xdpi.mode = MLX5E_XDP_XMIT_MODE_PAGE;

drivers/net/ethernet/sfc/rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ static bool efx_do_xdp(struct efx_nic *efx, struct efx_channel *channel,
329329

330330
case XDP_TX:
331331
/* Buffer ownership passes to tx on success. */
332-
xdpf = convert_to_xdp_frame(&xdp);
332+
xdpf = xdp_convert_buff_to_frame(&xdp);
333333
err = efx_xdp_tx_buffers(efx, 1, &xdpf, true);
334334
if (unlikely(err != 1)) {
335335
efx_free_rx_buffers(rx_queue, rx_buf, 1);

drivers/net/ethernet/socionext/netsec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ static u32 netsec_xdp_queue_one(struct netsec_priv *priv,
867867
static u32 netsec_xdp_xmit_back(struct netsec_priv *priv, struct xdp_buff *xdp)
868868
{
869869
struct netsec_desc_ring *tx_ring = &priv->desc_ring[NETSEC_RING_TX];
870-
struct xdp_frame *xdpf = convert_to_xdp_frame(xdp);
870+
struct xdp_frame *xdpf = xdp_convert_buff_to_frame(xdp);
871871
u32 ret;
872872

873873
if (unlikely(!xdpf))

drivers/net/ethernet/ti/cpsw_priv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ int cpsw_run_xdp(struct cpsw_priv *priv, int ch, struct xdp_buff *xdp,
13551355
ret = CPSW_XDP_PASS;
13561356
break;
13571357
case XDP_TX:
1358-
xdpf = convert_to_xdp_frame(xdp);
1358+
xdpf = xdp_convert_buff_to_frame(xdp);
13591359
if (unlikely(!xdpf))
13601360
goto drop;
13611361

0 commit comments

Comments
 (0)