netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alvaro Karsz <alvaro.karsz@solid-run.com>
Cc: "jasowang@redhat.com" <jasowang@redhat.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"virtualization@lists.linux-foundation.org" 
	<virtualization@lists.linux-foundation.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"xuanzhuo@linux.alibaba.com" <xuanzhuo@linux.alibaba.com>
Subject: Re: [RFC PATCH net 0/3] virtio-net: allow usage of small vrings
Date: Mon, 1 May 2023 06:27:34 -0400	[thread overview]
Message-ID: <20230501062107-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <AM0PR04MB4723C479C388266434DE415ED4699@AM0PR04MB4723.eurprd04.prod.outlook.com>

On Sun, Apr 30, 2023 at 06:15:03PM +0000, Alvaro Karsz wrote:
> 
> > > This patchset follows a discussion in the mailing list [1].
> > >
> > > This fixes only part of the bug, rings with less than 4 entries won't
> > > work.
> > 
> > Why the difference?
> > 
> 
> Because the RING_SIZE < 4 case requires much more adjustments.
> 
> * We may need to squeeze the virtio header into the headroom.
> * We may need to squeeze the GSO header into the headroom, or block the features.

We alread do this though no?
I think we'll need to tweak hard_header_len to guarantee it's there
as opposed to needed_headroom ...

> * At the moment, without NETIF_F_SG, we can receive a skb with 2 segments, we may need to reduce it to 1.

You are saying clearing NETIF_F_SG does not guarantee a linear skb?

> * We may need to change all the control commands, so class,  command and command specific data will fit in a single segment.
> * We may need to disable the control command and all the features depending on it.

well if we don't commands just fail as we can't add them right?
no corruption or stalls ...

> * We may need to disable NAPI?

hmm why napi?

> There may be more changes..
> 
> I was thinking that it may be easier to start with the easier case RING_SIZE >= 4, make sure everything is working fine, then send a follow up patchset with the required adjustments for RING_SIZE < 4.


it's ok but I'm just trying to figure out where does 4 come from.


  reply	other threads:[~2023-05-01 10:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-30 13:15 [RFC PATCH net 0/3] virtio-net: allow usage of small vrings Alvaro Karsz
2023-04-30 13:15 ` [RFC PATCH net 1/3] virtio: re-negotiate features if probe fails and features are blocked Alvaro Karsz
2023-04-30 13:27   ` Michael S. Tsirkin
2023-04-30 18:18     ` Alvaro Karsz
2023-04-30 13:15 ` [RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2 Alvaro Karsz
2023-04-30 14:05   ` Michael S. Tsirkin
2023-04-30 18:54     ` Alvaro Karsz
2023-05-01 10:20       ` Michael S. Tsirkin
2023-05-01 11:59         ` Alvaro Karsz
2023-06-02 11:30           ` Michael S. Tsirkin
2023-04-30 13:15 ` [RFC PATCH net 3/3] virtio-net: block ethtool from converting a ring to a small ring Alvaro Karsz
2023-04-30 14:06 ` [RFC PATCH net 0/3] virtio-net: allow usage of small vrings Michael S. Tsirkin
2023-04-30 18:15   ` Alvaro Karsz
2023-05-01 10:27     ` Michael S. Tsirkin [this message]
2023-05-01 11:41       ` Alvaro Karsz
2023-06-02 11:29         ` Michael S. Tsirkin
2023-06-17  7:44 ` Michael S. Tsirkin

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=20230501062107-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alvaro.karsz@solid-run.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jasowang@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xuanzhuo@linux.alibaba.com \
    /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).