search for: __virtnet_xdp_xmit_one

Displaying 11 results from an estimated 11 matches for "__virtnet_xdp_xmit_one".

2018 Nov 09
2
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
...p it, we should not have such burden. >> >> But we should notice that, with this removed, the compare between packed vs >> split is kind of unfair. > I don't think this ever triggers to be frank. When would it? I think it can happen e.g in the path of XDP transmission in __virtnet_xdp_xmit_one(): ??????? err = virtqueue_add_outbuf(sq->vq, sq->sg, 1, xdpf, GFP_ATOMIC); ??????? if (unlikely(err)) ??????????????? return -ENOSPC; /* Caller handle free/refcnt */ > >> Consider the removal of lguest support recently, >> maybe we can drop this for split ring as well?...
2018 Nov 09
2
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
...p it, we should not have such burden. >> >> But we should notice that, with this removed, the compare between packed vs >> split is kind of unfair. > I don't think this ever triggers to be frank. When would it? I think it can happen e.g in the path of XDP transmission in __virtnet_xdp_xmit_one(): ??????? err = virtqueue_add_outbuf(sq->vq, sq->sg, 1, xdpf, GFP_ATOMIC); ??????? if (unlikely(err)) ??????????????? return -ENOSPC; /* Caller handle free/refcnt */ > >> Consider the removal of lguest support recently, >> maybe we can drop this for split ring as well?...
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):
2018 Nov 09
0
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
...> > > > > But we should notice that, with this removed, the compare between packed vs > > > split is kind of unfair. > > I don't think this ever triggers to be frank. When would it? > > > I think it can happen e.g in the path of XDP transmission in > __virtnet_xdp_xmit_one(): > > > ??????? err = virtqueue_add_outbuf(sq->vq, sq->sg, 1, xdpf, GFP_ATOMIC); > ??????? if (unlikely(err)) > ??????????????? return -ENOSPC; /* Caller handle free/refcnt */ > I see. We used to do it for regular xmit but stopped doing it. Is it fine for xdp then? &gt...
2023 Jun 22
1
[PATCH vhost v10 10/10] virtio_net: support dma premapped
...ytes = 0; > void *ptr; > > - while ((ptr = virtqueue_get_buf(sq->vq, &len)) != NULL) { > + while ((ptr = virtnet_sq_get_buf(sq, &len, NULL)) != NULL) { > if (likely(!is_xdp_frame(ptr))) { > struct sk_buff *skb = ptr; > > @@ -667,8 +773,7 @@ static int __virtnet_xdp_xmit_one(struct virtnet_info *vi, > skb_frag_size(frag), skb_frag_off(frag)); > } > > - err = virtqueue_add_outbuf(sq->vq, sq->sg, nr_frags + 1, > - xdp_to_ptr(xdpf), GFP_ATOMIC); > + err = virtnet_add_outbuf(sq, nr_frags + 1, xdp_to_ptr(xdpf)); > if (unlikely(...
2018 Jul 31
8
[PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters
...me *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 __virtnet_xdp_xmit_one(vi, sq, xdpf); -} - static int virtnet_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames, u32 flags) { @@ -707,10 +687,8 @@ static struct sk_buff *receive_small(struct net_device *dev, xdpf = convert_to_xdp_frame(&xdp); if (unlikely(!xdpf)) goto err_xdp; -...
2018 Jul 31
8
[PATCH net-next 1/2] virtio-net: correctly update XDP_TX counters
...me *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 __virtnet_xdp_xmit_one(vi, sq, xdpf); -} - static int virtnet_xdp_xmit(struct net_device *dev, int n, struct xdp_frame **frames, u32 flags) { @@ -707,10 +687,8 @@ static struct sk_buff *receive_small(struct net_device *dev, xdpf = convert_to_xdp_frame(&xdp); if (unlikely(!xdpf)) goto err_xdp; -...
2018 Nov 08
4
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
On 2018/11/8 ??9:38, Tiwei Bie wrote: >>> + >>> + if (vq->vq.num_free < descs_used) { >>> + pr_debug("Can't add buf len %i - avail = %i\n", >>> + descs_used, vq->vq.num_free); >>> + /* FIXME: for historical reasons, we force a notify here if >>> + * there are outgoing parts to the buffer. Presumably the
2018 Nov 08
4
[PATCH net-next v2 3/5] virtio_ring: add packed ring support
On 2018/11/8 ??9:38, Tiwei Bie wrote: >>> + >>> + if (vq->vq.num_free < descs_used) { >>> + pr_debug("Can't add buf len %i - avail = %i\n", >>> + descs_used, vq->vq.num_free); >>> + /* FIXME: for historical reasons, we force a notify here if >>> + * there are outgoing parts to the buffer. Presumably the
2023 Jun 02
12
[PATCH vhost v10 00/10] virtio core prepares for AF_XDP
## About DMA APIs Now, virtio may can not work with DMA APIs when virtio features do not have VIRTIO_F_ACCESS_PLATFORM. 1. I tried to let DMA APIs return phy address by virtio-device. But DMA APIs just work with the "real" devices. 2. I tried to let xsk support callballs to get phy address from virtio-net driver as the dma address. But the maintainers of xsk may want to use
2023 Jun 02
12
[PATCH vhost v10 00/10] virtio core prepares for AF_XDP
## About DMA APIs Now, virtio may can not work with DMA APIs when virtio features do not have VIRTIO_F_ACCESS_PLATFORM. 1. I tried to let DMA APIs return phy address by virtio-device. But DMA APIs just work with the "real" devices. 2. I tried to let xsk support callballs to get phy address from virtio-net driver as the dma address. But the maintainers of xsk may want to use