Jason, wouldn't you say it's cleaner to avoid resets?Right, so how about passing xdp_queue_pairs as a parameter to- oxdp_qp = vi->xdp_queue_pairs;But xdp_queue_pairs is being used to detect if we should allocate the XDP
-
/* 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;
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?
virtnet_reset(). Then virtnet_reset() can set it after _remove_vq_common()
but before virtnet_restore_up()?
Thanks
Would you be interested in completing this work:
20170207053455-mutt-send-email-mst@xxxxxxxxxx