git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
datapath: Cleanup netlink compat code.
[sliver-openvswitch.git]
/
datapath
/
datapath.c
diff --git
a/datapath/datapath.c
b/datapath/datapath.c
index
1f7560a
..
2063f5c
100644
(file)
--- a/
datapath/datapath.c
+++ b/
datapath/datapath.c
@@
-54,7
+54,6
@@
#include <net/net_namespace.h>
#include <net/netns/generic.h>
#include <net/net_namespace.h>
#include <net/netns/generic.h>
-#include "checksum.h"
#include "datapath.h"
#include "flow.h"
#include "vlan.h"
#include "datapath.h"
#include "flow.h"
#include "vlan.h"
@@
-273,7
+272,7
@@
static struct genl_family dp_packet_genl_family = {
.name = OVS_PACKET_FAMILY,
.version = OVS_PACKET_VERSION,
.maxattr = OVS_PACKET_ATTR_MAX,
.name = OVS_PACKET_FAMILY,
.version = OVS_PACKET_VERSION,
.maxattr = OVS_PACKET_ATTR_MAX,
- SET_NETNSOK
+ .netnsok = true,
SET_PARALLEL_OPS
};
SET_PARALLEL_OPS
};
@@
-295,8
+294,6
@@
int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,
goto err;
}
goto err;
}
- forward_ip_summed(skb, true);
-
if (!skb_is_gso(skb))
err = queue_userspace_packet(ovs_dp_get_net(dp), dp_ifindex, skb, upcall_info);
else
if (!skb_is_gso(skb))
err = queue_userspace_packet(ovs_dp_get_net(dp), dp_ifindex, skb, upcall_info);
else
@@
-414,10
+411,12
@@
static int queue_userspace_packet(struct net *net, int dp_ifindex,
nskb = skb_clone(skb, GFP_ATOMIC);
if (!nskb)
return -ENOMEM;
nskb = skb_clone(skb, GFP_ATOMIC);
if (!nskb)
return -ENOMEM;
-
- err = vlan_deaccel_tag(nskb);
- if (err)
- return err;
+
+ nskb = __vlan_put_tag(nskb, nskb->vlan_proto, vlan_tx_tag_get(nskb));
+ if (!nskb)
+ return -ENOMEM;
+
+ vlan_set_tci(nskb, 0);
skb = nskb;
}
skb = nskb;
}
@@
-1004,7
+1003,7
@@
static struct genl_family dp_flow_genl_family = {
.name = OVS_FLOW_FAMILY,
.version = OVS_FLOW_VERSION,
.maxattr = OVS_FLOW_ATTR_MAX,
.name = OVS_FLOW_FAMILY,
.version = OVS_FLOW_VERSION,
.maxattr = OVS_FLOW_ATTR_MAX,
- SET_NETNSOK
+ .netnsok = true,
SET_PARALLEL_OPS
};
SET_PARALLEL_OPS
};
@@
-1388,7
+1387,7
@@
static int ovs_flow_cmd_new_or_set(struct sk_buff *skb, struct genl_info *info)
if (!IS_ERR(reply))
ovs_notify(reply, info, &ovs_dp_flow_multicast_group);
else
if (!IS_ERR(reply))
ovs_notify(reply, info, &ovs_dp_flow_multicast_group);
else
- netlink_set_err(
GENL_SOCK(sock_net(skb->sk))
, 0,
+ netlink_set_err(
sock_net(skb->sk)->genl_sock
, 0,
ovs_dp_flow_multicast_group.id, PTR_ERR(reply));
return 0;
ovs_dp_flow_multicast_group.id, PTR_ERR(reply));
return 0;
@@
-1584,7
+1583,7
@@
static struct genl_family dp_datapath_genl_family = {
.name = OVS_DATAPATH_FAMILY,
.version = OVS_DATAPATH_VERSION,
.maxattr = OVS_DP_ATTR_MAX,
.name = OVS_DATAPATH_FAMILY,
.version = OVS_DATAPATH_VERSION,
.maxattr = OVS_DP_ATTR_MAX,
- SET_NETNSOK
+ .netnsok = true,
SET_PARALLEL_OPS
};
SET_PARALLEL_OPS
};
@@
-1851,7
+1850,7
@@
static int ovs_dp_cmd_set(struct sk_buff *skb, struct genl_info *info)
info->snd_seq, OVS_DP_CMD_NEW);
if (IS_ERR(reply)) {
err = PTR_ERR(reply);
info->snd_seq, OVS_DP_CMD_NEW);
if (IS_ERR(reply)) {
err = PTR_ERR(reply);
- netlink_set_err(
GENL_SOCK(sock_net(skb->sk))
, 0,
+ netlink_set_err(
sock_net(skb->sk)->genl_sock
, 0,
ovs_dp_datapath_multicast_group.id, err);
err = 0;
goto unlock;
ovs_dp_datapath_multicast_group.id, err);
err = 0;
goto unlock;
@@
-1964,7
+1963,7
@@
static struct genl_family dp_vport_genl_family = {
.name = OVS_VPORT_FAMILY,
.version = OVS_VPORT_VERSION,
.maxattr = OVS_VPORT_ATTR_MAX,
.name = OVS_VPORT_FAMILY,
.version = OVS_VPORT_VERSION,
.maxattr = OVS_VPORT_ATTR_MAX,
- SET_NETNSOK
+ .netnsok = true,
SET_PARALLEL_OPS
};
SET_PARALLEL_OPS
};