Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1584332
| From | Jason Wang <jasowang@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next] virito-net: set queues after reset during xdp_set |
| Date | 2017-02-20 04:50 +0100 |
| Message-ID | <tcN98-7NW-3@gated-at.bofh.it> (permalink) |
| References | <tb3L3-6qS-21@gated-at.bofh.it> <tbIOd-7XE-1@gated-at.bofh.it> <tbJ7z-8ju-9@gated-at.bofh.it> <tcs4F-3dX-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2017年02月19日 13:08, Michael S. Tsirkin wrote:
>>>> - oxdp_qp = vi->xdp_queue_pairs;
>>>> -
>>>> /* Changing the headroom in buffers is a disruptive operation because
>>>> * existing buffers must be flushed and reallocated. This will happen
>>>> * when a xdp program is initially added or xdp is disabled by removing
>>>> * the xdp program resulting in number of XDP queues changing.
>>>> */
>>>> if (vi->xdp_queue_pairs != xdp_qp) {
>>>> - vi->xdp_queue_pairs = xdp_qp;
>>>> err = virtnet_reset(vi);
>>>> - if (err)
>>>> + if (err) {
>>>> + dev_warn(&dev->dev, "XDP reset failure.\n");
>>>> goto virtio_reset_err;
>>>> + }
>>>> + vi->xdp_queue_pairs = xdp_qp;
>>> But xdp_queue_pairs is being used to detect if we should allocate the XDP
>>> headroom. If we move it here do we have a set of buffers in the ring without
>>> the proper headroom when we assign the xdp program below?
>> Right, so how about passing xdp_queue_pairs as a parameter to
>> virtnet_reset(). Then virtnet_reset() can set it after _remove_vq_common()
>> but before virtnet_restore_up()?
>>
>> Thanks
> Jason, wouldn't you say it's cleaner to avoid resets?
> Would you be interested in completing this work:
>
> 20170207053455-mutt-send-email-mst@kernel.org
>
>
Yes, but this seems still need drop packets, is this acceptable?
Thanks
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH net-next] virito-net: set queues after reset during xdp_set Jason Wang <jasowang@redhat.com> - 2017-02-15 10:10 +0100
Re: [PATCH net-next] virito-net: set queues after reset during xdp_set "Michael S. Tsirkin" <mst@redhat.com> - 2017-02-16 18:30 +0100
Re: [PATCH net-next] virito-net: set queues after reset during xdp_set John Fastabend <john.fastabend@gmail.com> - 2017-02-17 06:00 +0100
Re: [PATCH net-next] virito-net: set queues after reset during xdp_set Jason Wang <jasowang@redhat.com> - 2017-02-17 06:20 +0100
Re: [PATCH net-next] virito-net: set queues after reset during xdp_set John Fastabend <john.fastabend@gmail.com> - 2017-02-18 00:40 +0100
Re: [PATCH net-next] virito-net: set queues after reset during xdp_set "Michael S. Tsirkin" <mst@redhat.com> - 2017-02-20 01:20 +0100
Re: [PATCH net-next] virito-net: set queues after reset during xdp_set "Michael S. Tsirkin" <mst@redhat.com> - 2017-02-19 06:20 +0100
Re: [PATCH net-next] virito-net: set queues after reset during xdp_set Jason Wang <jasowang@redhat.com> - 2017-02-20 04:50 +0100
csiph-web