On 5/5/26 10:42 AM, Adrian Moreno wrote:
> @@ -752,12 +759,16 @@ static struct genl_family dp_packet_genl_family
> __ro_after_init = {
> static void get_dp_stats(const struct datapath *dp, struct ovs_dp_stats
> *stats,
> struct ovs_dp_megaflow_stats *mega_stats)
> {
> + struct flow_table *table = ovsl_dereference(dp->table);
> int i;
>
> memset(mega_stats, 0, sizeof(*mega_stats));
> + memset(stats, 0, sizeof(*stats));
Is this an unrelated bugfix, preventing random values from stack
clobbering the stats? Should it land to a separate fix for net?
> @@ -1501,8 +1537,13 @@ static int ovs_flow_cmd_dump(struct sk_buff *skb,
> struct netlink_callback *cb)
> rcu_read_unlock();
> return -ENODEV;
> }
> + table = rcu_dereference_ovsl(dp->table);
Possibly:
table = rcu_dereference(dp->table);
would be more accurate
> @@ -518,6 +524,7 @@ void ovs_flow_tbl_destroy(struct flow_table *table)
> call_rcu(&mc->rcu, mask_cache_rcu_cb);
> call_rcu(&ma->rcu, mask_array_rcu_cb);
This is always invoked after a rcu grace period, it would be probably
nice to follow-up, not necessarly in this series, moving the above
call_rcu together with the call_rcu(table). Such statements could be
bundled in a new helper.
/P
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev