Skip to content

Commit 290b23c

Browse files
gal-pressmanNipaLocal
authored and
NipaLocal
committed
Revert "openvswitch: Move ovs_frag_data_storage into the struct ovs_pcpu_storage"
This reverts commit 3af4cdd. Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Gal Pressman <gal@nvidia.com> Signed-off-by: NipaLocal <nipa@local>
1 parent d9a1dcd commit 290b23c

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

net/openvswitch/actions.c

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@
3939
#include "flow_netlink.h"
4040
#include "openvswitch_trace.h"
4141

42+
#define MAX_L2_LEN (VLAN_ETH_HLEN + 3 * MPLS_HLEN)
43+
struct ovs_frag_data {
44+
unsigned long dst;
45+
struct vport *vport;
46+
struct ovs_skb_cb cb;
47+
__be16 inner_protocol;
48+
u16 network_offset; /* valid only for MPLS */
49+
u16 vlan_tci;
50+
__be16 vlan_proto;
51+
unsigned int l2_len;
52+
u8 mac_proto;
53+
u8 l2_data[MAX_L2_LEN];
54+
};
55+
56+
static DEFINE_PER_CPU(struct ovs_frag_data, ovs_frag_data_storage);
57+
4258
DEFINE_PER_CPU(struct ovs_pcpu_storage, ovs_pcpu_storage) = {
4359
.bh_lock = INIT_LOCAL_LOCK(bh_lock),
4460
};
@@ -755,7 +771,7 @@ static int set_sctp(struct sk_buff *skb, struct sw_flow_key *flow_key,
755771
static int ovs_vport_output(struct net *net, struct sock *sk,
756772
struct sk_buff *skb)
757773
{
758-
struct ovs_frag_data *data = this_cpu_ptr(&ovs_pcpu_storage.frag_data);
774+
struct ovs_frag_data *data = this_cpu_ptr(&ovs_frag_data_storage);
759775
struct vport *vport = data->vport;
760776

761777
if (skb_cow_head(skb, data->l2_len) < 0) {
@@ -807,7 +823,7 @@ static void prepare_frag(struct vport *vport, struct sk_buff *skb,
807823
unsigned int hlen = skb_network_offset(skb);
808824
struct ovs_frag_data *data;
809825

810-
data = this_cpu_ptr(&ovs_pcpu_storage.frag_data);
826+
data = this_cpu_ptr(&ovs_frag_data_storage);
811827
data->dst = skb->_skb_refdst;
812828
data->vport = vport;
813829
data->cb = *OVS_CB(skb);

net/openvswitch/datapath.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <linux/skbuff.h>
1414
#include <linux/u64_stats_sync.h>
1515
#include <net/ip_tunnels.h>
16-
#include <net/mpls.h>
1716

1817
#include "conntrack.h"
1918
#include "flow.h"
@@ -174,20 +173,6 @@ struct ovs_net {
174173
bool xt_label;
175174
};
176175

177-
#define MAX_L2_LEN (VLAN_ETH_HLEN + 3 * MPLS_HLEN)
178-
struct ovs_frag_data {
179-
unsigned long dst;
180-
struct vport *vport;
181-
struct ovs_skb_cb cb;
182-
__be16 inner_protocol;
183-
u16 network_offset; /* valid only for MPLS */
184-
u16 vlan_tci;
185-
__be16 vlan_proto;
186-
unsigned int l2_len;
187-
u8 mac_proto;
188-
u8 l2_data[MAX_L2_LEN];
189-
};
190-
191176
struct deferred_action {
192177
struct sk_buff *skb;
193178
const struct nlattr *actions;
@@ -215,7 +200,6 @@ struct action_flow_keys {
215200
struct ovs_pcpu_storage {
216201
struct action_fifo action_fifos;
217202
struct action_flow_keys flow_keys;
218-
struct ovs_frag_data frag_data;
219203
int exec_level;
220204
struct task_struct *owner;
221205
local_lock_t bh_lock;

0 commit comments

Comments
 (0)