From: Gal Pressman <gal@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>, <netdev@vger.kernel.org>
Cc: Aaron Conole <aconole@redhat.com>,
Eelco Chaudron <echaudro@redhat.com>,
Ilya Maximets <i.maximets@ovn.org>,
Simon Horman <horms@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Clark Williams <clrkwllms@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>, <dev@openvswitch.org>,
<linux-rt-devel@lists.linux.dev>, Gal Pressman <gal@nvidia.com>
Subject: [PATCH net 1/3] Revert "openvswitch: Move ovs_frag_data_storage into the struct ovs_pcpu_storage"
Date: Tue, 10 Jun 2025 09:26:29 +0300 [thread overview]
Message-ID: <20250610062631.1645885-2-gal@nvidia.com> (raw)
In-Reply-To: <20250610062631.1645885-1-gal@nvidia.com>
This reverts commit 3af4cdd67f32529c177b885d4ca491710e961928.
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Gal Pressman <gal@nvidia.com>
---
net/openvswitch/actions.c | 20 ++++++++++++++++++--
net/openvswitch/datapath.h | 16 ----------------
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index e7269a3eec79..435725c27a55 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -39,6 +39,22 @@
#include "flow_netlink.h"
#include "openvswitch_trace.h"
+#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];
+};
+
+static DEFINE_PER_CPU(struct ovs_frag_data, ovs_frag_data_storage);
+
DEFINE_PER_CPU(struct ovs_pcpu_storage, ovs_pcpu_storage) = {
.bh_lock = INIT_LOCAL_LOCK(bh_lock),
};
@@ -755,7 +771,7 @@ static int set_sctp(struct sk_buff *skb, struct sw_flow_key *flow_key,
static int ovs_vport_output(struct net *net, struct sock *sk,
struct sk_buff *skb)
{
- struct ovs_frag_data *data = this_cpu_ptr(&ovs_pcpu_storage.frag_data);
+ struct ovs_frag_data *data = this_cpu_ptr(&ovs_frag_data_storage);
struct vport *vport = data->vport;
if (skb_cow_head(skb, data->l2_len) < 0) {
@@ -807,7 +823,7 @@ static void prepare_frag(struct vport *vport, struct sk_buff *skb,
unsigned int hlen = skb_network_offset(skb);
struct ovs_frag_data *data;
- data = this_cpu_ptr(&ovs_pcpu_storage.frag_data);
+ data = this_cpu_ptr(&ovs_frag_data_storage);
data->dst = skb->_skb_refdst;
data->vport = vport;
data->cb = *OVS_CB(skb);
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h
index 1b5348b0f559..4a665c3cfa90 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -13,7 +13,6 @@
#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"
@@ -174,20 +173,6 @@ 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;
@@ -215,7 +200,6 @@ 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;
--
2.40.1
next prev parent reply other threads:[~2025-06-10 6:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 6:26 [PATCH net 0/3] Revert openvswitch per-CPU storage Gal Pressman
2025-06-10 6:26 ` Gal Pressman [this message]
2025-06-10 6:26 ` [PATCH net 2/3] Revert "openvswitch: Use nested-BH locking for ovs_pcpu_storage" Gal Pressman
2025-06-10 6:26 ` [PATCH net 3/3] Revert "openvswitch: Merge three per-CPU structures into one" Gal Pressman
2025-06-10 6:43 ` [PATCH net 0/3] Revert openvswitch per-CPU storage Sebastian Andrzej Siewior
2025-06-10 7:03 ` Gal Pressman
2025-06-10 7:06 ` Sebastian Andrzej Siewior
2025-06-10 7:08 ` Gal Pressman
2025-06-11 6:59 ` Sebastian Andrzej Siewior
2025-06-11 11:56 ` Gal Pressman
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=20250610062631.1645885-2-gal@nvidia.com \
--to=gal@nvidia.com \
--cc=aconole@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=bigeasy@linutronix.de \
--cc=clrkwllms@kernel.org \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=echaudro@redhat.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=i.maximets@ovn.org \
--cc=kuba@kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rostedt@goodmis.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.