mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
BACKPORT: 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 Change-Id: I19ca40280758c48ebe555de22fd5a32e7309cb34 Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Link: https://lore.kernel.org/bpf/6344f739be0d1a08ab2b9607584c4d5478c8c083.1590698295.git.lorenzo@kernel.org
This commit is contained in:
parent
c77e6f0c20
commit
57bf4889ad
11 changed files with 16 additions and 16 deletions
|
|
@ -2194,7 +2194,7 @@ static int i40e_xmit_xdp_ring(struct xdp_frame *xdpf,
|
|||
|
||||
int i40e_xmit_xdp_tx_ring(struct xdp_buff *xdp, struct i40e_ring *xdp_ring)
|
||||
{
|
||||
struct xdp_frame *xdpf = convert_to_xdp_frame(xdp);
|
||||
struct xdp_frame *xdpf = xdp_convert_buff_to_frame(xdp);
|
||||
|
||||
if (unlikely(!xdpf))
|
||||
return I40E_XDP_CONSUMED;
|
||||
|
|
|
|||
|
|
@ -2225,7 +2225,7 @@ static struct sk_buff *ixgbe_run_xdp(struct ixgbe_adapter *adapter,
|
|||
case XDP_PASS:
|
||||
break;
|
||||
case XDP_TX:
|
||||
xdpf = convert_to_xdp_frame(xdp);
|
||||
xdpf = xdp_convert_buff_to_frame(xdp);
|
||||
if (unlikely(!xdpf)) {
|
||||
result = IXGBE_XDP_CONSUMED;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ static int ixgbe_run_xdp_zc(struct ixgbe_adapter *adapter,
|
|||
case XDP_PASS:
|
||||
break;
|
||||
case XDP_TX:
|
||||
xdpf = convert_to_xdp_frame(xdp);
|
||||
xdpf = xdp_convert_buff_to_frame(xdp);
|
||||
if (unlikely(!xdpf)) {
|
||||
result = IXGBE_XDP_CONSUMED;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ mlx5e_xmit_xdp_buff(struct mlx5e_xdpsq *sq, struct mlx5e_rq *rq,
|
|||
struct xdp_frame *xdpf;
|
||||
dma_addr_t dma_addr;
|
||||
|
||||
xdpf = convert_to_xdp_frame(xdp);
|
||||
xdpf = xdp_convert_buff_to_frame(xdp);
|
||||
if (unlikely(!xdpf))
|
||||
return false;
|
||||
|
||||
|
|
@ -97,10 +97,10 @@ mlx5e_xmit_xdp_buff(struct mlx5e_xdpsq *sq, struct mlx5e_rq *rq,
|
|||
xdpi.frame.xdpf = xdpf;
|
||||
xdpi.frame.dma_addr = dma_addr;
|
||||
} else {
|
||||
/* Driver assumes that convert_to_xdp_frame returns an xdp_frame
|
||||
* that points to the same memory region as the original
|
||||
* xdp_buff. It allows to map the memory only once and to use
|
||||
* the DMA_BIDIRECTIONAL mode.
|
||||
/* Driver assumes that xdp_convert_buff_to_frame returns
|
||||
* an xdp_frame that points to the same memory region as
|
||||
* the original xdp_buff. It allows to map the memory only
|
||||
* once and to use the DMA_BIDIRECTIONAL mode.
|
||||
*/
|
||||
|
||||
xdpi.mode = MLX5E_XDP_XMIT_MODE_PAGE;
|
||||
|
|
|
|||
|
|
@ -867,7 +867,7 @@ static u32 netsec_xdp_queue_one(struct netsec_priv *priv,
|
|||
static u32 netsec_xdp_xmit_back(struct netsec_priv *priv, struct xdp_buff *xdp)
|
||||
{
|
||||
struct netsec_desc_ring *tx_ring = &priv->desc_ring[NETSEC_RING_TX];
|
||||
struct xdp_frame *xdpf = convert_to_xdp_frame(xdp);
|
||||
struct xdp_frame *xdpf = xdp_convert_buff_to_frame(xdp);
|
||||
u32 ret;
|
||||
|
||||
if (unlikely(!xdpf))
|
||||
|
|
|
|||
|
|
@ -1407,7 +1407,7 @@ resample:
|
|||
|
||||
static int tun_xdp_tx(struct net_device *dev, struct xdp_buff *xdp)
|
||||
{
|
||||
struct xdp_frame *frame = convert_to_xdp_frame(xdp);
|
||||
struct xdp_frame *frame = xdp_convert_buff_to_frame(xdp);
|
||||
|
||||
if (unlikely(!frame))
|
||||
return -EOVERFLOW;
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ out:
|
|||
static int veth_xdp_tx(struct net_device *dev, struct xdp_buff *xdp,
|
||||
struct veth_xdp_tx_bq *bq)
|
||||
{
|
||||
struct xdp_frame *frame = convert_to_xdp_frame(xdp);
|
||||
struct xdp_frame *frame = xdp_convert_buff_to_frame(xdp);
|
||||
|
||||
if (unlikely(!frame))
|
||||
return -EOVERFLOW;
|
||||
|
|
|
|||
|
|
@ -804,7 +804,7 @@ static struct sk_buff *receive_small(struct net_device *dev,
|
|||
break;
|
||||
case XDP_TX:
|
||||
stats->xdp_tx++;
|
||||
xdpf = convert_to_xdp_frame(&xdp);
|
||||
xdpf = xdp_convert_buff_to_frame(&xdp);
|
||||
if (unlikely(!xdpf))
|
||||
goto err_xdp;
|
||||
err = virtnet_xdp_xmit(dev, 1, &xdpf, 0);
|
||||
|
|
@ -992,7 +992,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
|
|||
break;
|
||||
case XDP_TX:
|
||||
stats->xdp_tx++;
|
||||
xdpf = convert_to_xdp_frame(&xdp);
|
||||
xdpf = xdp_convert_buff_to_frame(&xdp);
|
||||
if (unlikely(!xdpf))
|
||||
goto err_xdp;
|
||||
err = virtnet_xdp_xmit(dev, 1, &xdpf, 0);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ struct xdp_frame *xdp_convert_zc_to_xdp_frame(struct xdp_buff *xdp);
|
|||
|
||||
/* Convert xdp_buff to xdp_frame */
|
||||
static inline
|
||||
struct xdp_frame *convert_to_xdp_frame(struct xdp_buff *xdp)
|
||||
struct xdp_frame *xdp_convert_buff_to_frame(struct xdp_buff *xdp)
|
||||
{
|
||||
struct xdp_frame *xdp_frame;
|
||||
int metasize;
|
||||
|
|
|
|||
|
|
@ -624,7 +624,7 @@ int cpu_map_enqueue(struct bpf_cpu_map_entry *rcpu, struct xdp_buff *xdp,
|
|||
{
|
||||
struct xdp_frame *xdpf;
|
||||
|
||||
xdpf = convert_to_xdp_frame(xdp);
|
||||
xdpf = xdp_convert_buff_to_frame(xdp);
|
||||
if (unlikely(!xdpf))
|
||||
return -EOVERFLOW;
|
||||
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ static inline int __xdp_enqueue(struct net_device *dev, struct xdp_buff *xdp,
|
|||
if (unlikely(err))
|
||||
return err;
|
||||
|
||||
xdpf = convert_to_xdp_frame(xdp);
|
||||
xdpf = xdp_convert_buff_to_frame(xdp);
|
||||
if (unlikely(!xdpf))
|
||||
return -EOVERFLOW;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue