netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: netdev@vger.kernel.org, John Fastabend <john.fastabend@gmail.com>,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH net-next] virito-net: set queues after reset during xdp_set
Date: Mon, 20 Feb 2017 11:47:46 +0800	[thread overview]
Message-ID: <2ecb6621-d118-14aa-e935-3ba09e2150f7@redhat.com> (raw)
In-Reply-To: <20170219064402-mutt-send-email-mst@kernel.org>



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

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

      reply	other threads:[~2017-02-20  3:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15  9:08 [PATCH net-next] virito-net: set queues after reset during xdp_set Jason Wang
2017-02-16 17:21 ` Michael S. Tsirkin
2017-02-17  4:53 ` John Fastabend
2017-02-17  5:10   ` Jason Wang
2017-02-17 23:30     ` John Fastabend
2017-02-20  0:12       ` Michael S. Tsirkin
2017-02-19  5:08     ` Michael S. Tsirkin
2017-02-20  3:47       ` Jason Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ecb6621-d118-14aa-e935-3ba09e2150f7@redhat.com \
    --to=jasowang@redhat.com \
    --cc=john.fastabend@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).