2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-23 14:57:06 +00:00

compat: Backport conntrack strictly to v3.10+.

The conntrack/ipfrag backport was previously not entirely consistent in
its include for versions 3.9 and 3.10. The intention was to build it for
all kernels 3.10 and newer, so fix the version checks.

Reported-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Tested-by: Simon Horman <simon.horman@netronome.com>
This commit is contained in:
Joe Stringer
2015-12-15 11:24:34 -08:00
parent f2e11497cd
commit f2ab1536dd
3 changed files with 6 additions and 6 deletions

View File

@@ -68,7 +68,7 @@ struct ovs_frag_data {
u8 l2_data[MAX_L2_LEN];
};
#if LINUX_VERSION_CODE > KERNEL_VERSION(3,9,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
static DEFINE_PER_CPU(struct ovs_frag_data, ovs_frag_data_storage);
#endif
@@ -625,7 +625,7 @@ static int set_sctp(struct sk_buff *skb, struct sw_flow_key *flow_key,
return 0;
}
#if LINUX_VERSION_CODE > KERNEL_VERSION(3,9,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
static int ovs_vport_output(OVS_VPORT_OUTPUT_PARAMS)
{
struct ovs_frag_data *data = get_pcpu_ptr(ovs_frag_data_storage);
@@ -740,7 +740,7 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru,
err:
kfree_skb(skb);
}
#else /* <= 3.9 */
#else /* < 3.10 */
static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru,
__be16 ethertype)
{

View File

@@ -14,7 +14,7 @@
#include <linux/kconfig.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(3,9,0) && \
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) && \
IS_ENABLED(CONFIG_NF_CONNTRACK)
#include <linux/module.h>
@@ -798,4 +798,4 @@ void ovs_ct_exit(struct net *net)
nf_connlabels_put(net);
}
#endif /* CONFIG_NF_CONNTRACK && LINUX > 3.9 */
#endif /* CONFIG_NF_CONNTRACK && LINUX > 3.10 */

View File

@@ -20,7 +20,7 @@
struct ovs_conntrack_info;
enum ovs_key_attr;
#if IS_ENABLED(CONFIG_NF_CONNTRACK) && LINUX_VERSION_CODE > KERNEL_VERSION(3,9,0)
#if IS_ENABLED(CONFIG_NF_CONNTRACK) && LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
void ovs_ct_init(struct net *);
void ovs_ct_exit(struct net *);
bool ovs_ct_verify(struct net *, enum ovs_key_attr attr);