From: David Ahern <dsahern@kernel.org>
To: Daniel Machon <daniel.machon@microchip.com>,
Haon KIM <akrn112@naver.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net: l3mdev: Set OIF flag only when an L3 master exists
Date: Wed, 28 Oct 2026 08:50:29 -0600 [thread overview]
Message-ID: <b0e685c9-ad2e-4414-b59d-9dff7b0bfaa3@kernel.org> (raw)
In-Reply-To: <20261026083005.edngrb7gs52ouhm6@DEN-DL-M70577>
On 10/26/26 2:30 AM, Daniel Machon wrote:
> Hi Haon,
>
>> l3mdev_master_ifindex_rcu() may return 0 when the device is not
>> associated with an L3 master. In that case, l3mdev_update_flow()
>> currently sets FLOWI_FLAG_L3MDEV_OIF even though flowi_l3mdev
>> remains 0.
>>
>> Set FLOWI_FLAG_L3MDEV_OIF only when a non-zero L3 master ifindex
>> is returned, keeping the flag consistent with flowi_l3mdev.
>>
>> Signed-off-by: Haon KIM <akrn112@naver.com>
>> ---
>> net/l3mdev/l3mdev.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/net/l3mdev/l3mdev.c b/net/l3mdev/l3mdev.c
>> index 5432a5f2dfc8..92b48d6a4301 100644
>> --- a/net/l3mdev/l3mdev.c
>> +++ b/net/l3mdev/l3mdev.c
>> @@ -279,7 +279,8 @@ void l3mdev_update_flow(struct net *net, struct flowi *fl)
>> if (dev) {
>> if (!fl->flowi_l3mdev) {
>> fl->flowi_l3mdev = l3mdev_master_ifindex_rcu(dev);
>> - fl->flowi_flags |= FLOWI_FLAG_L3MDEV_OIF;
>> + if (fl->flowi_l3mdev)
>> + fl->flowi_flags |= FLOWI_FLAG_L3MDEV_OIF;
>
> Looking at the readers of this flag, it does not look like this does much, so if
> anything this is a no-functional clean-up for net-next, I guess. The commit
> description could be more specific about this. Also, the target tree is missing.
>
Example of a failing use case?
prev parent reply other threads:[~2026-10-28 14:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 17:57 [PATCH] net: l3mdev: Set OIF flag only when an L3 master exists Haon KIM
2026-10-26 8:30 ` Daniel Machon
2026-10-28 14:50 ` David Ahern [this message]
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=b0e685c9-ad2e-4414-b59d-9dff7b0bfaa3@kernel.org \
--to=dsahern@kernel.org \
--cc=akrn112@naver.com \
--cc=daniel.machon@microchip.com \
--cc=netdev@vger.kernel.org \
/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