All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Simon Horman <horms@kernel.org>
Cc: cedric.jehasse@luminex.be, Andrew Lunn <andrew@lunn.ch>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Russell King <linux@armlinux.org.uk>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v8 1/2] net/sched: cls_flower: remove unions from fl_flow_key
Date: Mon, 16 Mar 2026 16:19:17 -0700	[thread overview]
Message-ID: <20260316161917.76f1ea87@kernel.org> (raw)
In-Reply-To: <20260316083447.GD1369074@kernel.org>

On Mon, 16 Mar 2026 08:34:47 +0000 Simon Horman wrote:
> On Sat, Mar 14, 2026 at 10:00:02AM -0700, Jakub Kicinski wrote:
> > On Fri, 13 Mar 2026 13:26:51 +0000 Simon Horman wrote:  
> > > It seems to me that the use of a union is intentional here, as either IPv4
> > > or IPv6 addresses can be present in each case - never both.  And that
> > > control.addr_type and enc_control.addr_type are intended to allow
> > > differentiation of the address type in use for each of these unions.  
> > 
> > My reading was that the initial author simply wanted to save space in
> > the struct.
> > 
> > As the commit message explains this leads to complications in the logic
> > which sets the keys. The alternative is to complicate
> > FL_KEY_SET_IF_MASKED - doable, but given that the union feels like a
> > micro-optimization in the first place the simpler approach of separating
> > fields seems okay too? (TBH my mind also initially went down the
> > FL_KEY_SET_IF_MASKED rabbit hole but once I saw the simplicity of
> > Cedric's patch I changed my mind)  
> 
> Sure, now this has been put to me more than once I agree.
> 
> But if we go this way, then can we also simplify some of the existing logic?
> As a follow-up?

Which logic do you have in mind? Sorry if I'm being slow.

  reply	other threads:[~2026-03-16 23:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 10:46 [PATCH net-next v8 0/2] net: dsa: mv88e6xxx: Add partial support for TCAM entries Cedric Jehasse
2026-03-11 10:46 ` Cedric Jehasse via B4 Relay
2026-03-11 10:46 ` [PATCH net-next v8 1/2] net/sched: cls_flower: remove unions from fl_flow_key Cedric Jehasse
2026-03-11 10:46   ` Cedric Jehasse via B4 Relay
2026-03-13 13:26   ` Simon Horman
2026-03-13 14:31     ` Cedric Jehasse
2026-03-14 17:00     ` Jakub Kicinski
2026-03-16  8:34       ` Simon Horman
2026-03-16 23:19         ` Jakub Kicinski [this message]
2026-03-17 14:38           ` Simon Horman
2026-03-11 10:46 ` [PATCH net-next v8 2/2] net: dsa: mv88e6xxx: Add partial support for TCAM entries Cedric Jehasse
2026-03-11 10:46   ` Cedric Jehasse via B4 Relay
2026-03-17  9:50 ` [PATCH net-next v8 0/2] " patchwork-bot+netdevbpf

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=20260316161917.76f1ea87@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=cedric.jehasse@luminex.be \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --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.