mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
gve: rename gve_xdp_xmit to gve_xdp_xmit_gqi
In preparation for XDP DQ support, the gve_xdp_xmit callback needs to be generalized for all queue formats. This patch renames the GQ-specific function to gve_xdp_xmit_gqi, and introduces a new gve_xdp_xmit callback which branches on queue format. Reviewed-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Joshua Washington <joshwash@google.com> Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0289c51f88
commit
d05ebf7cc3
|
|
@ -1178,8 +1178,8 @@ void gve_free_queue_page_list(struct gve_priv *priv,
|
|||
u32 id);
|
||||
/* tx handling */
|
||||
netdev_tx_t gve_tx(struct sk_buff *skb, struct net_device *dev);
|
||||
int gve_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames,
|
||||
u32 flags);
|
||||
int gve_xdp_xmit_gqi(struct net_device *dev, int n, struct xdp_frame **frames,
|
||||
u32 flags);
|
||||
int gve_xdp_xmit_one(struct gve_priv *priv, struct gve_tx_ring *tx,
|
||||
void *data, int len, void *frame_p);
|
||||
void gve_xdp_tx_flush(struct gve_priv *priv, u32 xdp_qid);
|
||||
|
|
|
|||
|
|
@ -1516,6 +1516,16 @@ static int gve_set_xdp(struct gve_priv *priv, struct bpf_prog *prog,
|
|||
return err;
|
||||
}
|
||||
|
||||
static int gve_xdp_xmit(struct net_device *dev, int n,
|
||||
struct xdp_frame **frames, u32 flags)
|
||||
{
|
||||
struct gve_priv *priv = netdev_priv(dev);
|
||||
|
||||
if (gve_is_gqi(priv))
|
||||
return gve_xdp_xmit_gqi(dev, n, frames, flags);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static int gve_xsk_pool_enable(struct net_device *dev,
|
||||
struct xsk_buff_pool *pool,
|
||||
u16 qid)
|
||||
|
|
|
|||
|
|
@ -823,8 +823,8 @@ static int gve_tx_fill_xdp(struct gve_priv *priv, struct gve_tx_ring *tx,
|
|||
return ndescs;
|
||||
}
|
||||
|
||||
int gve_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames,
|
||||
u32 flags)
|
||||
int gve_xdp_xmit_gqi(struct net_device *dev, int n, struct xdp_frame **frames,
|
||||
u32 flags)
|
||||
{
|
||||
struct gve_priv *priv = netdev_priv(dev);
|
||||
struct gve_tx_ring *tx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user