All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Dan Jurgens <danielj@nvidia.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, jasowang@redhat.com, pabeni@redhat.com,
	virtualization@lists.linux.dev, parav@nvidia.com,
	shshitrit@nvidia.com, yohadt@nvidia.com,
	xuanzhuo@linux.alibaba.com, eperezma@redhat.com, jgg@ziepe.ca,
	kevin.tian@intel.com, andrew+netdev@lunn.ch, edumazet@google.com
Subject: Re: [PATCH net-next v20 00/12] virtio_net: Add ethtool flow rules support
Date: Sat, 7 Feb 2026 16:14:43 -0500	[thread overview]
Message-ID: <20260207160509-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <c96d6b1c-5bad-4e06-905c-10f722c9b9d1@nvidia.com>

On Sat, Feb 07, 2026 at 07:14:25AM -0600, Dan Jurgens wrote:
> On 2/7/26 4:01 AM, Michael S. Tsirkin wrote:
> > On Thu, Feb 05, 2026 at 06:43:28PM -0800, Jakub Kicinski wrote:
> >> On Thu, 5 Feb 2026 16:46:55 -0600 Daniel Jurgens wrote:
> >>> This series implements ethtool flow rules support for virtio_net using the
> >>> virtio flow filter (FF) specification. The implementation allows users to
> >>> configure packet filtering rules through ethtool commands, directing
> >>> packets to specific receive queues, or dropping them based on various
> >>> header fields.
> >>
> >> This is a 4th version of this you posted in as many days and it doesn't
> >> even build. Please slow down. Please wait with v21 until after the merge
> >> window. We have enough patches to sift thru still for v7.0.
> > 
> > v20 and no end in sight.
> > Just looking at the amount of pain all this parsing is inflicting
> > makes me worry. And wait until we need to begin worrying about
> > maintaining UAPI stability.
> > 
> > It would be much nicer if drivers were out of the business of parsing
> > fiddly structures.  Isn't there a way for more code in net core
> > to deal with all this?
> 
> MST, you reviewed the spec that defined these data structures. If you
> didn't want the driver to have parse data structures then suggesting
> using the same format as the ethtool flow specs would have been a great
> idea at that point. Or short of that padded and fixed size data
> structures would also made things much cleaner.

Oh virtio is actually reasonably nice IMHO, and of course
virtio net has to parse them. But a bunch of issues
I reported are around parsing uapi/linux/ethtool.h structures.
There is a ton of code like this:


+static void parse_ip4(struct iphdr *mask, struct iphdr *key,
+                     const struct ethtool_rx_flow_spec *fs)
+{
+       const struct ethtool_usrip4_spec *l3_mask = &fs->m_u.usr_ip4_spec;
+       const struct ethtool_usrip4_spec *l3_val  = &fs->h_u.usr_ip4_spec;
+
+       if (l3_mask->ip4src) {
+               memcpy(&mask->saddr, &l3_mask->ip4src, sizeof(mask->saddr));
+               memcpy(&key->saddr, &l3_val->ip4src, sizeof(key->saddr));
+       }
+
+       if (l3_mask->ip4dst) {
+               memcpy(&mask->daddr, &l3_mask->ip4dst, sizeof(mask->daddr));
+               memcpy(&key->daddr, &l3_val->ip4dst, sizeof(key->daddr));
+       }
+
+       if (l3_mask->tos) {
+               mask->tos = l3_mask->tos;
+               key->tos = l3_val->tos;
+       }
+}
+

and I just ask, given there's apparently nothing at all here
that is driver specific, whether it is generally useful
enough to live in net core?


> I thought this series was close to done, so I was trying to address the
> very non-deterministic AI review comments. It's been generating new
> comments on things that had been there for many revisions, and running
> it locally with the same model never reproduces the comments from the
> online review.

Uncritically posting, or trying to address "ai review" comments is not
at all a good idea.


A bigger problem is that we are still not done finding bugs in this.
My thought therefore was to see if we can move more code to
net core where more *humans* will read it and help find and fix bug.

-- 
MST


  reply	other threads:[~2026-02-07 21:14 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 22:46 [PATCH net-next v20 00/12] virtio_net: Add ethtool flow rules support Daniel Jurgens
2026-02-05 22:46 ` [PATCH net-next v20 01/12] virtio_pci: Remove supported_cap size build assert Daniel Jurgens
2026-02-05 22:46 ` [PATCH net-next v20 02/12] virtio: Add config_op for admin commands Daniel Jurgens
2026-02-05 22:46 ` [PATCH net-next v20 03/12] virtio: Expose generic device capability operations Daniel Jurgens
2026-02-05 22:46 ` [PATCH net-next v20 04/12] virtio: Expose object create and destroy API Daniel Jurgens
2026-02-05 22:47 ` [PATCH net-next v20 05/12] virtio_net: Query and set flow filter caps Daniel Jurgens
2026-02-06  6:43   ` kernel test robot
2026-02-06 22:14   ` kernel test robot
2026-02-08 11:51   ` Michael S. Tsirkin
2026-02-08 17:29   ` Michael S. Tsirkin
2026-02-05 22:47 ` [PATCH net-next v20 06/12] virtio_net: Create a FF group for ethtool steering Daniel Jurgens
2026-02-05 22:47 ` [PATCH net-next v20 07/12] virtio_net: Implement layer 2 ethtool flow rules Daniel Jurgens
2026-02-08 11:35   ` Michael S. Tsirkin
2026-02-08 11:54   ` Michael S. Tsirkin
2026-02-05 22:47 ` [PATCH net-next v20 08/12] virtio_net: Use existing classifier if possible Daniel Jurgens
2026-02-05 22:47 ` [PATCH net-next v20 09/12] virtio_net: Implement IPv4 ethtool flow rules Daniel Jurgens
2026-02-05 22:47 ` [PATCH net-next v20 10/12] virtio_net: Add support for IPv6 ethtool steering Daniel Jurgens
2026-02-08 10:08   ` Michael S. Tsirkin
2026-02-05 22:47 ` [PATCH net-next v20 11/12] virtio_net: Add support for TCP and UDP ethtool rules Daniel Jurgens
2026-02-05 22:47 ` [PATCH net-next v20 12/12] virtio_net: Add get ethtool flow rules ops Daniel Jurgens
2026-02-06  2:43 ` [PATCH net-next v20 00/12] virtio_net: Add ethtool flow rules support Jakub Kicinski
2026-02-07 10:01   ` Michael S. Tsirkin
2026-02-07 13:14     ` Dan Jurgens
2026-02-07 21:14       ` Michael S. Tsirkin [this message]
2026-02-08 11:55 ` Michael S. Tsirkin
2026-02-08 13:57   ` Dan Jurgens
2026-02-08 17:22     ` 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=20260207160509-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=danielj@nvidia.com \
    --cc=edumazet@google.com \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=kevin.tian@intel.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=parav@nvidia.com \
    --cc=shshitrit@nvidia.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    --cc=yohadt@nvidia.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.