All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alvaro Karsz <alvaro.karsz@solid-run.com>
Cc: Jason Wang <jasowang@redhat.com>,
	Jakub Kicinski <kuba@kernel.org>, netdev <netdev@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next v4] net: virtio_net: notifications coalescing support
Date: Wed, 20 Jul 2022 03:15:27 -0400	[thread overview]
Message-ID: <20220720031436-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAJs=3_DHW6qwjjx3ZBH2SVC0kaKviSrHHG+Hsh8-VxAbRNdP7A@mail.gmail.com>

On Wed, Jul 20, 2022 at 10:07:11AM +0300, Alvaro Karsz wrote:
> > Hmm. we currently (ab)use tx_max_coalesced_frames values 0 and 1 to mean tx
> napi on/off.
> > However I am not sure we should treat any value != 1 as napi on.
> >
> > I don't really have good ideas - I think abusing coalescing might
> > have been a mistake. But now that we are there, I feel we need
> > a way for userspace to at least be able to figure out whether
> > setting coalescing to 0 will have nasty side effects.
> 
> 
> So, how can I proceed from here?
> Maybe we don't need to use tx napi when this feature is negotiated (like Jakub
> suggested in prev. versions)?
> It makes sense, since the number of TX notifications can be reduced by setting
> tx_usecs/tx_max_packets with ethtool.


Hmm Jason had some ideas about extensions in mind when he
coded the current UAPI, let's see if he has ideas.
I'll ruminate on compatibility a bit too.

> > It's also a bit of a spec defect that it does not document corner cases
> > like what do 0 values do, are they different from 1? or what are max values.
> > Not too late to fix?
> 
> 
> I think that some of the corner cases can be understood from the coalescing
> values.
> For example:
> if rx_usecs=0 we should wait for 0 usecs, meaning that we should send a
> notification immediately.
> But if rx_usecs=1 we should wait for 1 usec.
> The case with max_packets is a little bit unclear for the values 0/1, and it
> seems that in both cases we should send a notification immediately after
> receiving/sending a packet.
> 
> 
> > So the spec says
> >         Device supports notifications coalescing.
> >
> > which makes more sense - there's not a lot guest needs to do here.
> 
> 
> Noted.
> 
> > parameters?
> 
>  
> I'll change it to "settings".
> 
> > why with dash here? And why not just put the comments near the fields
> > themselves?
> 
> 
> Noted.


  parent reply	other threads:[~2022-07-20  7:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-18  9:11 [PATCH net-next v4] net: virtio_net: notifications coalescing support Alvaro Karsz
2022-07-19  7:03 ` Jason Wang
2022-07-19  7:08   ` Alvaro Karsz
2022-07-19  7:12     ` Jason Wang
2022-07-19  7:18       ` Alvaro Karsz
2022-07-19  7:31         ` Jason Wang
2022-07-20  0:26 ` Jakub Kicinski
2022-07-20  6:45   ` Michael S. Tsirkin
2022-07-20  7:02     ` Jason Wang
2022-07-20  7:05       ` Michael S. Tsirkin
2022-07-20  7:15         ` Jason Wang
2022-07-20  9:05           ` Michael S. Tsirkin
     [not found]         ` <CAJs=3_DHW6qwjjx3ZBH2SVC0kaKviSrHHG+Hsh8-VxAbRNdP7A@mail.gmail.com>
2022-07-20  7:15           ` Michael S. Tsirkin [this message]
2022-07-20  7:42             ` Jason Wang
2022-07-20  7:45               ` Jason Wang
2022-07-20  7:56                 ` Alvaro Karsz
2022-07-20  8:28                   ` Jason Wang
2022-07-20  9:09                 ` Michael S. Tsirkin
2022-07-20  6:28 ` Michael S. Tsirkin
2022-07-20  8:52   ` Jason Wang
2022-08-09 19:11 ` Michael S. Tsirkin
2022-08-09 19:14 ` Michael S. Tsirkin
2022-08-29  8:46 ` Xuan Zhuo
2022-08-29  9:14   ` Alvaro Karsz
2022-08-29  9:18     ` Xuan Zhuo

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=20220720031436-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=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.