diff options
| author | David S. Miller <davem@davemloft.net> | 2014-01-06 19:48:38 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-01-06 19:48:38 -0500 |
| commit | 39b6b2992f9dc65d1de5c66e7ec2271b8a5fac33 (patch) | |
| tree | c0fc4e2be0429bb4d7643e6b6f8f5a56212f9284 /include | |
| parent | 56a4342dfe3145cd66f766adccb28fd9b571606d (diff) | |
| parent | 443cd88c8a31379e95326428bbbd40af25c1d440 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch
Jesse Gross says:
====================
[GIT net-next] Open vSwitch
Open vSwitch changes for net-next/3.14. Highlights are:
* Performance improvements in the mechanism to get packets to userspace
using memory mapped netlink and skb zero copy where appropriate.
* Per-cpu flow stats in situations where flows are likely to be shared
across CPUs. Standard flow stats are used in other situations to save
memory and allocation time.
* A handful of code cleanups and rationalization.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/skbuff.h | 3 | ||||
| -rw-r--r-- | include/net/genetlink.h | 4 | ||||
| -rw-r--r-- | include/uapi/linux/openvswitch.h | 14 |
3 files changed, 20 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 88d4f2ebbec6..956e11a168d8 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -2445,6 +2445,9 @@ int skb_splice_bits(struct sk_buff *skb, unsigned int offset, | |||
| 2445 | struct pipe_inode_info *pipe, unsigned int len, | 2445 | struct pipe_inode_info *pipe, unsigned int len, |
| 2446 | unsigned int flags); | 2446 | unsigned int flags); |
| 2447 | void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); | 2447 | void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to); |
| 2448 | unsigned int skb_zerocopy_headlen(const struct sk_buff *from); | ||
| 2449 | void skb_zerocopy(struct sk_buff *to, const struct sk_buff *from, | ||
| 2450 | int len, int hlen); | ||
| 2448 | void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len); | 2451 | void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len); |
| 2449 | int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen); | 2452 | int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen); |
| 2450 | void skb_scrub_packet(struct sk_buff *skb, bool xnet); | 2453 | void skb_scrub_packet(struct sk_buff *skb, bool xnet); |
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 1b177ed803b7..93695f0e22a5 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
| @@ -73,6 +73,7 @@ struct genl_family { | |||
| 73 | * @attrs: netlink attributes | 73 | * @attrs: netlink attributes |
| 74 | * @_net: network namespace | 74 | * @_net: network namespace |
| 75 | * @user_ptr: user pointers | 75 | * @user_ptr: user pointers |
| 76 | * @dst_sk: destination socket | ||
| 76 | */ | 77 | */ |
| 77 | struct genl_info { | 78 | struct genl_info { |
| 78 | u32 snd_seq; | 79 | u32 snd_seq; |
| @@ -85,6 +86,7 @@ struct genl_info { | |||
| 85 | struct net * _net; | 86 | struct net * _net; |
| 86 | #endif | 87 | #endif |
| 87 | void * user_ptr[2]; | 88 | void * user_ptr[2]; |
| 89 | struct sock * dst_sk; | ||
| 88 | }; | 90 | }; |
| 89 | 91 | ||
| 90 | static inline struct net *genl_info_net(struct genl_info *info) | 92 | static inline struct net *genl_info_net(struct genl_info *info) |
| @@ -177,6 +179,8 @@ void genl_notify(struct genl_family *family, | |||
| 177 | struct sk_buff *skb, struct net *net, u32 portid, | 179 | struct sk_buff *skb, struct net *net, u32 portid, |
| 178 | u32 group, struct nlmsghdr *nlh, gfp_t flags); | 180 | u32 group, struct nlmsghdr *nlh, gfp_t flags); |
| 179 | 181 | ||
| 182 | struct sk_buff *genlmsg_new_unicast(size_t payload, struct genl_info *info, | ||
| 183 | gfp_t flags); | ||
| 180 | void *genlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, | 184 | void *genlmsg_put(struct sk_buff *skb, u32 portid, u32 seq, |
| 181 | struct genl_family *family, int flags, u8 cmd); | 185 | struct genl_family *family, int flags, u8 cmd); |
| 182 | 186 | ||
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index d120f9fe0017..970553cbbc8e 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h | |||
| @@ -40,7 +40,15 @@ struct ovs_header { | |||
| 40 | 40 | ||
| 41 | #define OVS_DATAPATH_FAMILY "ovs_datapath" | 41 | #define OVS_DATAPATH_FAMILY "ovs_datapath" |
| 42 | #define OVS_DATAPATH_MCGROUP "ovs_datapath" | 42 | #define OVS_DATAPATH_MCGROUP "ovs_datapath" |
| 43 | #define OVS_DATAPATH_VERSION 0x1 | 43 | |
| 44 | /* V2: | ||
| 45 | * - API users are expected to provide OVS_DP_ATTR_USER_FEATURES | ||
| 46 | * when creating the datapath. | ||
| 47 | */ | ||
| 48 | #define OVS_DATAPATH_VERSION 2 | ||
| 49 | |||
| 50 | /* First OVS datapath version to support features */ | ||
| 51 | #define OVS_DP_VER_FEATURES 2 | ||
| 44 | 52 | ||
| 45 | enum ovs_datapath_cmd { | 53 | enum ovs_datapath_cmd { |
| 46 | OVS_DP_CMD_UNSPEC, | 54 | OVS_DP_CMD_UNSPEC, |
| @@ -75,6 +83,7 @@ enum ovs_datapath_attr { | |||
| 75 | OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */ | 83 | OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */ |
| 76 | OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */ | 84 | OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */ |
| 77 | OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */ | 85 | OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */ |
| 86 | OVS_DP_ATTR_USER_FEATURES, /* OVS_DP_F_* */ | ||
| 78 | __OVS_DP_ATTR_MAX | 87 | __OVS_DP_ATTR_MAX |
| 79 | }; | 88 | }; |
| 80 | 89 | ||
| @@ -106,6 +115,9 @@ struct ovs_vport_stats { | |||
| 106 | __u64 tx_dropped; /* no space available in linux */ | 115 | __u64 tx_dropped; /* no space available in linux */ |
| 107 | }; | 116 | }; |
| 108 | 117 | ||
| 118 | /* Allow last Netlink attribute to be unaligned */ | ||
| 119 | #define OVS_DP_F_UNALIGNED (1 << 0) | ||
| 120 | |||
| 109 | /* Fixed logical ports. */ | 121 | /* Fixed logical ports. */ |
| 110 | #define OVSP_LOCAL ((__u32)0) | 122 | #define OVSP_LOCAL ((__u32)0) |
| 111 | 123 | ||
