search for: xdp_frame

Displaying 20 results from an estimated 27 matches for "xdp_frame".

2019 Feb 04
0
[PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames
From: Toshiaki Makita <makita.toshiaki at lab.ntt.co.jp> Date: Thu, 31 Jan 2019 20:40:30 +0900 > Previously virtnet_xdp_xmit() did not account for device tx counters, > which caused confusions. > To be consistent with SKBs, account them on freeing xdp_frames. > > Reported-by: David Ahern <dsahern at gmail.com> > Signed-off-by: Toshiaki Makita <makita.toshiaki at lab.ntt.co.jp> Applied, thank you.
2019 Feb 01
0
[PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames
...:25:17 -0500 >> >>> On Thu, Jan 31, 2019 at 08:40:30PM +0900, Toshiaki Makita wrote: >>>> Previously virtnet_xdp_xmit() did not account for device tx counters, >>>> which caused confusions. >>>> To be consistent with SKBs, account them on freeing xdp_frames. >>>> >>>> Reported-by: David Ahern <dsahern at gmail.com> >>>> Signed-off-by: Toshiaki Makita <makita.toshiaki at lab.ntt.co.jp> >>> >>> Well we count them on receive so I guess it makes sense for consistency >>> >&gt...
2019 Feb 04
0
[PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames
On Sat, 2 Feb 2019 14:27:26 -0700 David Ahern <dsahern at gmail.com> wrote: > On 1/31/19 1:15 PM, Jesper Dangaard Brouer wrote: > >> > >> David, Jesper, care to chime in where we ended up in that last thread > >> discussion this? > > > > IHMO packets RX and TX on a device need to be accounted, in standard > > counters, regardless of XDP.
2019 Feb 07
0
Resource management for ndo_xdp_xmit (Was: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames)
On Wed, 6 Feb 2019 00:06:33 +0000 Saeed Mahameed <saeedm at mellanox.com> wrote: > On Mon, 2019-02-04 at 19:13 -0800, David Ahern wrote: [...] > > > > mlx5 needs some work. As I recall it still has the bug/panic > > removing xdp programs - at least I don't recall seeing a patch for > > it. > > Only when xdp_redirect to mlx5, and removing the program
2019 Feb 08
0
[PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames
On Wed, 6 Feb 2019 00:06:33 +0000 Saeed Mahameed <saeedm at mellanox.com> wrote: > 2) Driver should keep track of XDP decisions statistics, report them in > ethtool and in the new API suggested by David. track even (XDP_PASS) ? > > Maybe instead of having all drivers track the statistics on their own, > we should move the responsibility to upper layer. > > Idea: since
2019 Feb 09
0
Resource management for ndo_xdp_xmit (Was: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames)
On Sat, 9 Feb 2019 00:18:31 +0000, Saeed Mahameed wrote: > On Fri, 2019-02-08 at 15:17 -0800, Saeed Mahameed wrote: > > On Thu, 2019-02-07 at 19:08 +0000, Saeed Mahameed wrote: > > > > > > So > > > 1) on dev_map_update_elem() we will call > > > dev->dev->ndo_bpf() to notify the device on the intention to > > > start/stop > >
2019 Feb 06
1
[PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames
On Wed, 6 Feb 2019 00:06:33 +0000 Saeed Mahameed <saeedm at mellanox.com> wrote: > 3) Unrelated, In non XDP case, if skb allocation fails or driver fails > to pass the skb up to the stack for somereason, should the driver > increase rx packets ? IMHO the answer should be yes if we want to have > similar behavior between XDP and non XDP cases. I don't think "skb
2019 Apr 18
2
Stats for XDP actions (was: Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames)
David Ahern <dsahern at gmail.com> writes: > On 2/4/19 3:53 AM, Jesper Dangaard Brouer wrote: >> On Sat, 2 Feb 2019 14:27:26 -0700 >> David Ahern <dsahern at gmail.com> wrote: >> >>> On 1/31/19 1:15 PM, Jesper Dangaard Brouer wrote: >>>>> >>>>> David, Jesper, care to chime in where we ended up in that last thread
2023 Apr 03
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...t; +static int virtnet_xdp_handler(struct bpf_prog *xdp_prog, struct xdp_buff *xdp, > + struct net_device *dev, > + unsigned int *xdp_xmit, > + struct virtnet_rq_stats *stats) > +{ > + struct xdp_frame *xdpf; > + int err; > + u32 act; > + > + act = bpf_prog_run_xdp(xdp_prog, xdp); > + stats->xdp_packets++; > + > + switch (act) { > + case XDP_PASS: > + return VIRTNET_XDP_RES_PASS; > + > + case XDP_TX: >...
2023 Mar 08
3
[PATCH net, stable v1 0/3] add checking sq is full inside xdp xmit
If the queue of xdp xmit is not an independent queue, then when the xdp xmit used all the desc, the xmit from the __dev_queue_xmit() may encounter the following error. net ens4: Unexpected TXQ (0) queue failure: -28 This patch adds a check whether sq is full in XDP Xmit. Thanks. v1: 1. rename to check_sq_full_and_disable 2. reorder some funcs to avoid declaration Xuan Zhuo (3):
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...ff *xdp, > > > > + struct net_device *dev, > > > > + unsigned int *xdp_xmit, > > > > + struct virtnet_rq_stats *stats) > > > > +{ > > > > + struct xdp_frame *xdpf; > > > > + int err; > > > > + u32 act; > > > > + > > > > + act = bpf_prog_run_xdp(xdp_prog, xdp); > > > > + stats->xdp_packets++; > > > > + > > > > + switch (act) { > > &...
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...gt; > + struct net_device *dev, > > > > > + unsigned int *xdp_xmit, > > > > > + struct virtnet_rq_stats *stats) > > > > > +{ > > > > > + struct xdp_frame *xdpf; > > > > > + int err; > > > > > + u32 act; > > > > > + > > > > > + act = bpf_prog_run_xdp(xdp_prog, xdp); > > > > > + stats->xdp_packets++; > > > > > + > > > > >...
2023 Apr 04
1
[PATCH net-next 3/8] virtio_net: introduce virtnet_xdp_handler() to seprate the logic of run xdp
...struct net_device *dev, > > > > > > > + unsigned int *xdp_xmit, > > > > > > > + struct virtnet_rq_stats *stats) > > > > > > > +{ > > > > > > > + struct xdp_frame *xdpf; > > > > > > > + int err; > > > > > > > + u32 act; > > > > > > > + > > > > > > > + act = bpf_prog_run_xdp(xdp_prog, xdp); > > > > > > > + stats->xdp_packets++; &...
2018 Jul 31
8
[PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters
...nsigned int xdp_tx_drops; - } tx; }; #define VIRTNET_SQ_STAT(m) offsetof(struct virtnet_sq_stats, m) @@ -485,22 +481,6 @@ static struct send_queue *virtnet_xdp_sq(struct virtnet_info *vi) return &vi->sq[qp]; } -static int __virtnet_xdp_tx_xmit(struct virtnet_info *vi, - struct xdp_frame *xdpf) -{ - struct xdp_frame *xdpf_sent; - struct send_queue *sq; - unsigned int len; - - sq = virtnet_xdp_sq(vi); - - /* Free up any pending old buffers before queueing new ones. */ - while ((xdpf_sent = virtqueue_get_buf(sq->vq, &len)) != NULL) - xdp_return_frame(xdpf_sent); - - return __...
2018 Jul 31
8
[PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters
...nsigned int xdp_tx_drops; - } tx; }; #define VIRTNET_SQ_STAT(m) offsetof(struct virtnet_sq_stats, m) @@ -485,22 +481,6 @@ static struct send_queue *virtnet_xdp_sq(struct virtnet_info *vi) return &vi->sq[qp]; } -static int __virtnet_xdp_tx_xmit(struct virtnet_info *vi, - struct xdp_frame *xdpf) -{ - struct xdp_frame *xdpf_sent; - struct send_queue *sq; - unsigned int len; - - sq = virtnet_xdp_sq(vi); - - /* Free up any pending old buffers before queueing new ones. */ - while ((xdpf_sent = virtqueue_get_buf(sq->vq, &len)) != NULL) - xdp_return_frame(xdpf_sent); - - return __...
2020 May 06
2
[PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP
...ocessing XDP? > >> there's no way for XDP to know the existence of the vnet header currently. > It is true that XDP is unaware of this area, which is the way it > should be. Currently the area will survive after calling BPF/XDP. > After your change it will be overwritten in xdp_frame cases. > > >> So let's just not reserve space for vnet header in this case. > I think this is a wrong approach! > > We are working on supporting GRO multi-buffer for XDP. The vnet header > contains GRO information (see pahole below sign). Another note is that since we...
2020 May 06
2
[PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP
...ocessing XDP? > >> there's no way for XDP to know the existence of the vnet header currently. > It is true that XDP is unaware of this area, which is the way it > should be. Currently the area will survive after calling BPF/XDP. > After your change it will be overwritten in xdp_frame cases. > > >> So let's just not reserve space for vnet header in this case. > I think this is a wrong approach! > > We are working on supporting GRO multi-buffer for XDP. The vnet header > contains GRO information (see pahole below sign). Another note is that since we...
2020 May 06
0
[PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP
...so use this "before" area). > there's no way for XDP to know the existence of the vnet header currently. It is true that XDP is unaware of this area, which is the way it should be. Currently the area will survive after calling BPF/XDP. After your change it will be overwritten in xdp_frame cases. > So let's just not reserve space for vnet header in this case. I think this is a wrong approach! We are working on supporting GRO multi-buffer for XDP. The vnet header contains GRO information (see pahole below sign). It is currently not used in the XDP case, but we will be work...
2020 May 06
0
[PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP
...> > > there's no way for XDP to know the existence of the vnet header currently. > > It is true that XDP is unaware of this area, which is the way it > > should be. Currently the area will survive after calling BPF/XDP. > > After your change it will be overwritten in xdp_frame cases. > > > > > > > So let's just not reserve space for vnet header in this case. > > I think this is a wrong approach! > > > > We are working on supporting GRO multi-buffer for XDP. The vnet header > > contains GRO information (see pahole below...
2020 May 06
6
[PATCH net-next 1/2] virtio-net: don't reserve space for vnet header for XDP
We tried to reserve space for vnet header before xdp.data_hard_start. But this is useless since the packet could be modified by XDP which may invalidate the information stored in the header and there's no way for XDP to know the existence of the vnet header currently. So let's just not reserve space for vnet header in this case. Cc: Jesper Dangaard Brouer <brouer at redhat.com>