diff options
| author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2025-05-12 11:27:30 +0200 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2025-05-15 15:23:31 +0200 |
| commit | 3af4cdd67f32529c177b885d4ca491710e961928 (patch) | |
| tree | c64012d1ae76a9b26e8c201d372b3b0bdf02b902 /net/openvswitch/datapath.h | |
| parent | openvswitch: Use nested-BH locking for ovs_pcpu_storage (diff) | |
| download | linux-3af4cdd67f32529c177b885d4ca491710e961928.tar.gz linux-3af4cdd67f32529c177b885d4ca491710e961928.zip | |
openvswitch: Move ovs_frag_data_storage into the struct ovs_pcpu_storage
ovs_frag_data_storage is a per-CPU variable and relies on disabled BH for its
locking. Without per-CPU locking in local_bh_disable() on PREEMPT_RT
this data structure requires explicit locking.
Move ovs_frag_data_storage into the struct ovs_pcpu_storage which already
provides locking for the structure.
Cc: Aaron Conole <aconole@redhat.com>
Cc: Eelco Chaudron <echaudro@redhat.com>
Cc: Ilya Maximets <i.maximets@ovn.org>
Cc: dev@openvswitch.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Link: https://patch.msgid.link/20250512092736.229935-10-bigeasy@linutronix.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/openvswitch/datapath.h')
| -rw-r--r-- | net/openvswitch/datapath.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h index 4a665c3cfa90..1b5348b0f559 100644 --- a/net/openvswitch/datapath.h +++ b/net/openvswitch/datapath.h @@ -13,6 +13,7 @@ #include <linux/skbuff.h> #include <linux/u64_stats_sync.h> #include <net/ip_tunnels.h> +#include <net/mpls.h> #include "conntrack.h" #include "flow.h" @@ -173,6 +174,20 @@ struct ovs_net { bool xt_label; }; +#define MAX_L2_LEN (VLAN_ETH_HLEN + 3 * MPLS_HLEN) +struct ovs_frag_data { + unsigned long dst; + struct vport *vport; + struct ovs_skb_cb cb; + __be16 inner_protocol; + u16 network_offset; /* valid only for MPLS */ + u16 vlan_tci; + __be16 vlan_proto; + unsigned int l2_len; + u8 mac_proto; + u8 l2_data[MAX_L2_LEN]; +}; + struct deferred_action { struct sk_buff *skb; const struct nlattr *actions; @@ -200,6 +215,7 @@ struct action_flow_keys { struct ovs_pcpu_storage { struct action_fifo action_fifos; struct action_flow_keys flow_keys; + struct ovs_frag_data frag_data; int exec_level; struct task_struct *owner; local_lock_t bh_lock; |
