From: Petr Machata <petrm@nvidia.com>
To: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Cc: Petr Machata <petrm@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>, <netdev@vger.kernel.org>,
Simon Horman <horms@kernel.org>, Ido Schimmel <idosch@nvidia.com>,
<mlxsw@nvidia.com>, Andrew Lunn <andrew+netdev@lunn.ch>,
Menglong Dong <menglong8.dong@gmail.com>,
Guillaume Nault <gnault@redhat.com>,
"Alexander Lobakin" <aleksander.lobakin@intel.com>,
Breno Leitao <leitao@debian.org>
Subject: Re: [PATCH net-next v1 04/11] vxlan: vxlan_rcv(): Extract vxlan_hdr(skb) to a named variable
Date: Thu, 5 Dec 2024 11:44:25 +0100 [thread overview]
Message-ID: <87ldwuie1s.fsf@nvidia.com> (raw)
In-Reply-To: <6d317ad7-84f4-4cfe-b7d5-22eafada0f17@intel.com>
Mateusz Polchlopek <mateusz.polchlopek@intel.com> writes:
> On 12/3/2024 3:30 PM, Petr Machata wrote:
>
>> @@ -1713,7 +1714,7 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
>> * used by VXLAN extensions if explicitly requested.
>> */
>> if (vxlan->cfg.flags & VXLAN_F_GPE) {
>> - if (!vxlan_parse_gpe_proto(vxlan_hdr(skb), &protocol))
>> + if (!vxlan_parse_gpe_proto(vh, &protocol))
>> goto drop;
>> unparsed.vx_flags &= ~VXLAN_GPE_USED_BITS;
>> raw_proto = true;
>
> Overall that's cool refactor but I wonder - couldn't it be somehow
> merged with patch03? You touch vxlan_rcv function and the same
> pieces of code in both patches, so maybe you can do that there?
> Squash those two patches into one? It seems that in this patch you
> change something you already changed in prev patch - maybe
> it should be done in patch03? Or do I miss something?
Look, I'm juggling various bits back and forth and honestly it's all
much of a muchness. There's nothing obviously better whichever way you
package it. First changing to open-coded vxlan_hdr in 03 makes sense,
because it's already open-coded like that several times. Then we have a
clean 04 that replaces all the existing open-coded sites, including the
new one, thus everything is done in one go.
I'd just leave it as is, largely because I don't want to touch something
that works for frankly cosmetic reasons when the end result is the same.
next prev parent reply other threads:[~2024-12-05 11:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 14:30 [PATCH net-next v1 00/11] vxlan: Support user-defined reserved bits Petr Machata
2024-12-03 14:30 ` [PATCH net-next v1 01/11] vxlan: In vxlan_rcv(), access flags through the vxlan netdevice Petr Machata
2024-12-03 14:30 ` [PATCH net-next v1 02/11] vxlan: vxlan_rcv() callees: Move clearing of unparsed flags out Petr Machata
2024-12-03 14:30 ` [PATCH net-next v1 03/11] vxlan: vxlan_rcv() callees: Drop the unparsed argument Petr Machata
2024-12-03 14:30 ` [PATCH net-next v1 04/11] vxlan: vxlan_rcv(): Extract vxlan_hdr(skb) to a named variable Petr Machata
2024-12-04 12:59 ` Mateusz Polchlopek
2024-12-05 10:44 ` Petr Machata [this message]
2024-12-05 11:22 ` Mateusz Polchlopek
2024-12-03 14:30 ` [PATCH net-next v1 05/11] vxlan: Track reserved bits explicitly as part of the configuration Petr Machata
2024-12-03 14:30 ` [PATCH net-next v1 06/11] vxlan: Bump error counters for header mismatches Petr Machata
2024-12-03 14:30 ` [PATCH net-next v1 07/11] vxlan: vxlan_rcv(): Drop unparsed Petr Machata
2024-12-03 14:30 ` [PATCH net-next v1 08/11] vxlan: Add an attribute to make VXLAN header validation configurable Petr Machata
2024-12-03 14:30 ` [PATCH net-next v1 09/11] selftests: net: lib: Rename ip_link_master() to ip_link_set_master() Petr Machata
2024-12-03 14:30 ` [PATCH net-next v1 10/11] selftests: net: lib: Add several autodefer helpers Petr Machata
2024-12-03 14:30 ` [PATCH net-next v1 11/11] selftests: forwarding: Add a selftest for the new reserved_bits UAPI Petr Machata
2024-12-04 3:08 ` Jakub Kicinski
2024-12-04 10:44 ` Petr Machata
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=87ldwuie1s.fsf@nvidia.com \
--to=petrm@nvidia.com \
--cc=aleksander.lobakin@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gnault@redhat.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=mateusz.polchlopek@intel.com \
--cc=menglong8.dong@gmail.com \
--cc=mlxsw@nvidia.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).