Ido Schimmel
2022-Oct-20 13:06 UTC
[Bridge] [PATCH v8 net-next 02/12] net: bridge: add blackhole fdb entry flag
On Tue, Oct 18, 2022 at 06:56:09PM +0200, Hans J. Schultz wrote:> Add a 'blackhole' fdb flag, ensuring that no forwarding from any port > to a destination MAC that has a FDB entry with this flag on will occur. > The packets will thus be dropped. > > When the blackhole fdb flag is set, the 'local' flag will also be enabled > as blackhole entries are not associated with any port.It reads as if the kernel will enable the 'local' flag automatically, which is not true anymore. The bridge driver enforces that 'NUD_PERMANENT' is set if 'NTF_EXT_BLACKHOLE' is specified.> > Thus the command will be alike to: > bridge fdb add MAC dev br0 local blackhole > > Signed-off-by: Hans J. Schultz <netdev at kapio-technology.com>Looks OK to me. See one comment below. Reviewed-by: Ido Schimmel <idosch at nvidia.com> [...]> @@ -1140,7 +1148,7 @@ static int __br_fdb_add(struct ndmsg *ndm, struct net_bridge *br, > err = br_fdb_external_learn_add(br, p, addr, vid, true); > } else { > spin_lock_bh(&br->hash_lock); > - err = fdb_add_entry(br, p, addr, ndm, nlh_flags, vid, nfea_tb); > + err = fdb_add_entry(br, p, addr, ndm, nlh_flags, vid, ext_flags, nfea_tb);I believe the preference is to wrap to 80 columns when possible.> spin_unlock_bh(&br->hash_lock); > }
netdev at kapio-technology.com
2022-Oct-20 19:34 UTC
[Bridge] [PATCH v8 net-next 02/12] net: bridge: add blackhole fdb entry flag
On 2022-10-20 15:06, Ido Schimmel wrote:> On Tue, Oct 18, 2022 at 06:56:09PM +0200, Hans J. Schultz wrote: >> Add a 'blackhole' fdb flag, ensuring that no forwarding from any port >> to a destination MAC that has a FDB entry with this flag on will >> occur. >> The packets will thus be dropped. >> >> When the blackhole fdb flag is set, the 'local' flag will also be >> enabled >> as blackhole entries are not associated with any port. > > It reads as if the kernel will enable the 'local' flag automatically, > which is not true anymore. The bridge driver enforces that > 'NUD_PERMANENT' is set if 'NTF_EXT_BLACKHOLE' is specified. > >> >> Thus the command will be alike to: >> bridge fdb add MAC dev br0 local blackhole >> >> Signed-off-by: Hans J. Schultz <netdev at kapio-technology.com> > > Looks OK to me. See one comment below. > > Reviewed-by: Ido Schimmel <idosch at nvidia.com> > > [...] > >> @@ -1140,7 +1148,7 @@ static int __br_fdb_add(struct ndmsg *ndm, >> struct net_bridge *br, >> err = br_fdb_external_learn_add(br, p, addr, vid, true); >> } else { >> spin_lock_bh(&br->hash_lock); >> - err = fdb_add_entry(br, p, addr, ndm, nlh_flags, vid, nfea_tb); >> + err = fdb_add_entry(br, p, addr, ndm, nlh_flags, vid, ext_flags, >> nfea_tb); > > I believe the preference is to wrap to 80 columns when possible.Ok, I only have knowledge of 100 columns as a limit.
netdev at kapio-technology.com
2022-Oct-23 05:32 UTC
[Bridge] [PATCH v8 net-next 02/12] net: bridge: add blackhole fdb entry flag
On 2022-10-20 15:06, Ido Schimmel wrote:> [...] > >> @@ -1140,7 +1148,7 @@ static int __br_fdb_add(struct ndmsg *ndm, >> struct net_bridge *br, >> err = br_fdb_external_learn_add(br, p, addr, vid, true); >> } else { >> spin_lock_bh(&br->hash_lock); >> - err = fdb_add_entry(br, p, addr, ndm, nlh_flags, vid, nfea_tb); >> + err = fdb_add_entry(br, p, addr, ndm, nlh_flags, vid, ext_flags, >> nfea_tb); > > I believe the preference is to wrap to 80 columns when possible.Very strange... since I ran checkpatch.pl from the net-next kernel itself and it did not give me any warnings about 80 columns, but rather said 'patch is ready for submission'. As this is silent, could it be some missing python plugins or something to do with perl?