Displaying 8 results from an estimated 8 matches for "is_dyn".
Did you mean:
is_dir
2023 Jan 19
1
[Bridge] [RFC PATCH net-next 1/5] net: bridge: add dynamic flag to switchdev notifier
On Thu, Jan 19, 2023 at 11:33:58AM +0200, Vladimir Oltean wrote:
> On Wed, Jan 18, 2023 at 11:14:00PM +0100, netdev at kapio-technology.com wrote:
> > > > + item->is_dyn = !test_bit(BR_FDB_STATIC, &fdb->flags);
> > >
> > > Why reverse logic? Why not just name this "is_static" and leave any
> > > further interpretations up to the consumer?
> >
> > My reasoning for this is that the common case is to have stati...
2023 Jan 19
1
[Bridge] [RFC PATCH net-next 1/5] net: bridge: add dynamic flag to switchdev notifier
On Wed, Jan 18, 2023 at 11:14:00PM +0100, netdev at kapio-technology.com wrote:
> > > + item->is_dyn = !test_bit(BR_FDB_STATIC, &fdb->flags);
> >
> > Why reverse logic? Why not just name this "is_static" and leave any
> > further interpretations up to the consumer?
>
> My reasoning for this is that the common case is to have static entries,
> thus is_d...
2023 Jan 18
1
[Bridge] [RFC PATCH net-next 1/5] net: bridge: add dynamic flag to switchdev notifier
...switchdev.h
>> index ca0312b78294..aaf918d4ba67 100644
>> --- a/include/net/switchdev.h
>> +++ b/include/net/switchdev.h
>> @@ -249,6 +249,7 @@ struct switchdev_notifier_fdb_info {
>> u8 added_by_user:1,
>> is_local:1,
>> locked:1,
>> + is_dyn:1,
>> offloaded:1;
>> };
>>
>> diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c
>> index 7eb6fd5bb917..60c05a00a1df 100644
>> --- a/net/bridge/br_switchdev.c
>> +++ b/net/bridge/br_switchdev.c
>> @@ -136,6 +136,7 @@ static voi...
2023 Jan 17
1
[Bridge] [RFC PATCH net-next 1/5] net: bridge: add dynamic flag to switchdev notifier
...e/net/switchdev.h b/include/net/switchdev.h
> index ca0312b78294..aaf918d4ba67 100644
> --- a/include/net/switchdev.h
> +++ b/include/net/switchdev.h
> @@ -249,6 +249,7 @@ struct switchdev_notifier_fdb_info {
> u8 added_by_user:1,
> is_local:1,
> locked:1,
> + is_dyn:1,
> offloaded:1;
> };
>
> diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c
> index 7eb6fd5bb917..60c05a00a1df 100644
> --- a/net/bridge/br_switchdev.c
> +++ b/net/bridge/br_switchdev.c
> @@ -136,6 +136,7 @@ static void br_switchdev_fdb_populate(str...
2023 Mar 18
1
[Bridge] [PATCH v2 net-next 1/6] net: bridge: add dynamic flag to switchdev notifier
...ed, 2 insertions(+)
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
index ca0312b78294..aaf918d4ba67 100644
--- a/include/net/switchdev.h
+++ b/include/net/switchdev.h
@@ -249,6 +249,7 @@ struct switchdev_notifier_fdb_info {
u8 added_by_user:1,
is_local:1,
locked:1,
+ is_dyn:1,
offloaded:1;
};
diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c
index de18e9c1d7a7..9707d3fdb396 100644
--- a/net/bridge/br_switchdev.c
+++ b/net/bridge/br_switchdev.c
@@ -134,6 +134,7 @@ static void br_switchdev_fdb_populate(struct net_bridge *br,
item->added_by_...
2023 Jan 17
1
[Bridge] [RFC PATCH net-next 2/5] net: dsa: propagate flags down towards drivers
...if (ctx && ctx != dp)
> return 0;
> @@ -3410,6 +3415,9 @@ static int dsa_slave_fdb_event(struct net_device *dev,
> orig_dev->name, fdb_info->addr, fdb_info->vid,
> host_addr ? " as host address" : "");
>
> + if (fdb_info->is_dyn)
> + fdb_flags |= DSA_FDB_FLAG_DYNAMIC;
> +
Hmm, I don't think this is going to work with the assisted_learning_on_cpu_port
feature ("if (switchdev_fdb_is_dynamically_learned(fdb_info))"). The reason being
that a "dynamically learned" FDB entry (defined as this):
st...
2023 Feb 17
1
[Bridge] [PATCH net-next 5/5] net: dsa: mv88e6xxx: implementation of dynamic ATU entries
...sted!). I feel that it robustly covers
> > all cases for fdb_flags. And as a bonus doesn't need to be modified
> > if other (unsupported) flags are added in future.
> >
> > if (fdb_flags & ~(DSA_FDB_FLAG_DYNAMIC))
> > return -EOPNOTSUPP;
> >
> > is_dynamic = !!(fdb_flags & DSA_FDB_FLAG_DYNAMIC)
> > if (is_dynamic)
> > state = MV88E6XXX_G1_ATU_DATA_STATE_UC_AGE_7_NEWEST;
> >
> >
> > And perhaps for other drivers:
> >
> > if (fdb_flags & ~(DSA_FDB_FLAG_DYNAMIC))
> > return -EOPNOTSUPP;
&...
2023 Jan 18
1
[Bridge] [RFC PATCH net-next 2/5] net: dsa: propagate flags down towards drivers
...>> return 0;
>> @@ -3410,6 +3415,9 @@ static int dsa_slave_fdb_event(struct net_device
>> *dev,
>> orig_dev->name, fdb_info->addr, fdb_info->vid,
>> host_addr ? " as host address" : "");
>>
>> + if (fdb_info->is_dyn)
>> + fdb_flags |= DSA_FDB_FLAG_DYNAMIC;
>> +
>
> Hmm, I don't think this is going to work with the
> assisted_learning_on_cpu_port
> feature ("if (switchdev_fdb_is_dynamically_learned(fdb_info))"). The
> reason being
> that a "dynamically learned...