From: Jiri Pirko <jiri@resnulli.us>
To: Vlad Buslov <vladbu@nvidia.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, netdev@vger.kernel.org, vyasevic@redhat.com,
Gal Pressman <gal@nvidia.com>
Subject: Re: [PATCH net] macvlan: Don't propagate promisc change to lower dev in passthru
Date: Wed, 15 Nov 2023 08:16:27 +0100 [thread overview]
Message-ID: <ZVRwS4wIy1ORH4jS@nanopsycho> (raw)
In-Reply-To: <20231114175915.1649154-1-vladbu@nvidia.com>
Tue, Nov 14, 2023 at 06:59:15PM CET, vladbu@nvidia.com wrote:
>Macvlan device in passthru mode sets its lower device promiscuous mode
>according to its MACVLAN_FLAG_NOPROMISC flag instead of synchronizing it to
>its own promiscuity setting. However, macvlan_change_rx_flags() function
>doesn't check the mode before propagating such changes to the lower device
>which can cause net_device->promiscuity counter overflow as illustrated by
>reproduction example [0] and resulting dmesg log [1]. Fix the issue by
>first verifying the mode in macvlan_change_rx_flags() function before
>propagating promiscuous mode change to the lower device.
>
>[0]:
>ip link add macvlan1 link enp8s0f0 type macvlan mode passthru
>ip link set macvlan1 promisc on
>ip l set dev macvlan1 up
>ip link set macvlan1 promisc off
>ip l set dev macvlan1 down
>ip l set dev macvlan1 up
>
>[1]:
>[ 5156.281724] macvlan1: entered promiscuous mode
>[ 5156.285467] mlx5_core 0000:08:00.0 enp8s0f0: entered promiscuous mode
>[ 5156.287639] macvlan1: left promiscuous mode
>[ 5156.288339] mlx5_core 0000:08:00.0 enp8s0f0: left promiscuous mode
>[ 5156.290907] mlx5_core 0000:08:00.0 enp8s0f0: entered promiscuous mode
>[ 5156.317197] mlx5_core 0000:08:00.0 enp8s0f0: promiscuity touches roof, set promiscuity failed. promiscuity feature of device might be broken.
>
>Fixes: efdbd2b30caa ("macvlan: Propagate promiscuity setting to lower devices.")
>Reviewed-by: Gal Pressman <gal@nvidia.com>
>Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
next prev parent reply other threads:[~2023-11-15 7:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 17:59 [PATCH net] macvlan: Don't propagate promisc change to lower dev in passthru Vlad Buslov
2023-11-15 7:16 ` Jiri Pirko [this message]
2023-11-16 10:29 ` 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=ZVRwS4wIy1ORH4jS@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladbu@nvidia.com \
--cc=vyasevic@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).