lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251119020521-mutt-send-email-mst@kernel.org>
Date: Wed, 19 Nov 2025 02:06:35 -0500
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Dan Jurgens <danielj@...dia.com>
Cc: netdev@...r.kernel.org, jasowang@...hat.com, pabeni@...hat.com,
	virtualization@...ts.linux.dev, parav@...dia.com,
	shshitrit@...dia.com, yohadt@...dia.com, xuanzhuo@...ux.alibaba.com,
	eperezma@...hat.com, jgg@...pe.ca, kevin.tian@...el.com,
	kuba@...nel.org, andrew+netdev@...n.ch, edumazet@...gle.com
Subject: Re: [PATCH net-next v11 09/12] virtio_net: Implement IPv4 ethtool
 flow rules

On Wed, Nov 19, 2025 at 01:03:36AM -0600, Dan Jurgens wrote:
> On 11/18/25 3:31 PM, Michael S. Tsirkin wrote:
> > On Tue, Nov 18, 2025 at 08:38:59AM -0600, Daniel Jurgens wrote:
> >> Add support for IP_USER type rules from ethtool.
> >>
> >> +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;
> >> +
> >> +	mask->saddr = l3_mask->ip4src;
> >> +	mask->daddr = l3_mask->ip4dst;
> >> +	key->saddr = l3_val->ip4src;
> >> +	key->daddr = l3_val->ip4dst;
> >> +
> >> +	if (l3_mask->proto) {
> > 
> > you seem to check mask for proto here but the ethtool_usrip4_spec doc
> > seems to say the mask for proto must be 0. 
> > 
> > 
> > what gives?
> > 
> 
> Then for user_ip flows ethtool should provide 0 as the mask, and based
> on your comment below I'm verifying that.

but if it does then how did this patch work in your testing?

> I can move this hunk to the TCP/UDP patch if you prefer.


not sure what you mean so I can't comment on that.
generally it's best to add code in the same patch where
it's used - easier to review.

-- 
MST


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ