netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch,
	Alexander Duyck <alexanderduyck@meta.com>
Subject: Re: [PATCH net-next 2/2] eth: fbnic: set IFF_UNICAST_FLT to avoid enabling promiscuous mode when adding unicast addrs
Date: Tue, 4 Feb 2025 12:48:57 +0000	[thread overview]
Message-ID: <20250204124857.GA234677@kernel.org> (raw)
In-Reply-To: <20250204010038.1404268-2-kuba@kernel.org>

On Mon, Feb 03, 2025 at 05:00:38PM -0800, Jakub Kicinski wrote:
> From: Alexander Duyck <alexanderduyck@meta.com>
> 
> I realized when we were adding unicast addresses we were enabling
> promiscous mode. I did a bit of digging and realized we had overlooked
> setting the driver private flag to indicate we supported unicast filtering.
> 
> Example below shows the table with 00deadbeef01 as the main NIC address,
> and 5 additional addresses in the 00deadbeefX0 format.
> 
>   # cat $dbgfs/mac_addr
>   Idx S TCAM Bitmap       Addr/Mask
>   ----------------------------------
>   00  0 00000000,00000000 000000000000
>                           000000000000
>   01  0 00000000,00000000 000000000000
>                           000000000000
>   02  0 00000000,00000000 000000000000
>                           000000000000
>   ...
>   24  0 00000000,00000000 000000000000
>                           000000000000
>   25  1 00100000,00000000 00deadbeef50
>                           000000000000
>   26  1 00100000,00000000 00deadbeef40
>                           000000000000
>   27  1 00100000,00000000 00deadbeef30
>                           000000000000
>   28  1 00100000,00000000 00deadbeef20
>                           000000000000
>   29  1 00100000,00000000 00deadbeef10
>                           000000000000
>   30  1 00100000,00000000 00deadbeef01
>                           000000000000
>   31  0 00000000,00000000 000000000000
>                           000000000000
> 
> Before rule 31 would be active. With this change it correctly sticks
> to just the unicast filters.
> 
> Signed-off-by: Alexander Duyck <alexanderduyck@meta.com>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Simon Horman <horms@kernel.org>


  reply	other threads:[~2025-02-04 12:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04  1:00 [PATCH net-next 1/2] eth: fbnic: add MAC address TCAM to debugfs Jakub Kicinski
2025-02-04  1:00 ` [PATCH net-next 2/2] eth: fbnic: set IFF_UNICAST_FLT to avoid enabling promiscuous mode when adding unicast addrs Jakub Kicinski
2025-02-04 12:48   ` Simon Horman [this message]
2025-02-04 12:48 ` [PATCH net-next 1/2] eth: fbnic: add MAC address TCAM to debugfs Simon Horman
2025-02-06 11:00 ` 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=20250204124857.GA234677@kernel.org \
    --to=horms@kernel.org \
    --cc=alexanderduyck@meta.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --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).