public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel•org>
To: Vincent Bernat <vincent@bernat•ch>
Cc: Alce Lafranque <alce@lafranque•net>,
	"David S. Miller" <davem@davemloft•net>,
	Eric Dumazet <edumazet@google•com>,
	Paolo Abeni <pabeni@redhat•com>, David Ahern <dsahern@kernel•org>,
	Ido Schimmel <idosch@nvidia•com>,
	netdev@vger•kernel.org
Subject: Re: [PATCH net-next v7] vxlan: add support for flowlabel inherit
Date: Thu, 26 Oct 2023 09:04:24 -0700	[thread overview]
Message-ID: <20231026090424.73a49f35@kernel.org> (raw)
In-Reply-To: <8adb039f-00db-40a1-bcb6-4379e823fd0b@bernat.ch>

On Thu, 26 Oct 2023 17:53:22 +0200 Vincent Bernat wrote:
> >> +	enum ifla_vxlan_label_policy	label_policy;  
> > 
> > Here, OTOH, you could save some space, by making it a u8.  
> 
> Is it worth it?

I'm just pointing out the irony of trying to save space in netlink,
where everything is aligned to 4B, and not trying where it may actually
matter :)

> Keeping an enum helps the compiler catching some 
> mistakes and it documents a bit the code (we could put a comment 
> instead). In most cases, there is not a lot of vlan_config structs lying 
> around (when there are many VXLAN devices, people use single VXLAN 
> devices), so it shouldn't be a problem for memory or cache.

Pretty sure the single switch statement will be just fine without 
to compiler helping us. Plus we won't have to re-align the struct :S

> Alternatively, we could push this to another patch that would also 
> handle df field.

Meh.

  reply	other threads:[~2023-10-26 16:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24 16:50 [PATCH net-next v7] vxlan: add support for flowlabel inherit Alce Lafranque
2023-10-26  0:19 ` David Ahern
2023-10-26  1:20 ` Jakub Kicinski
2023-10-26 15:53   ` Vincent Bernat
2023-10-26 16:04     ` Jakub Kicinski [this message]
2023-10-30 19:18       ` Vincent Bernat

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=20231026090424.73a49f35@kernel.org \
    --to=kuba@kernel$(echo .)org \
    --cc=alce@lafranque$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=dsahern@kernel$(echo .)org \
    --cc=edumazet@google$(echo .)com \
    --cc=idosch@nvidia$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=vincent@bernat$(echo .)ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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