mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
Currently OVS out of tree datapath supports a large number of kernel versions. From 2.6.32 to 4.3 and various distribution-specific kernels. But at this point major features are only available on more recent kernels. For example, stateful services are only available starting in kernel 3.10 and STT is available on starting with 3.5. Since these features are becoming essential to many OVS deployments, and the effort of maintaining the backports is high. We have decided to drop support for older kernel. Following patch drops supports for kernel older than 3.10. Signed-off-by: Pravin B Shelar <pshelar@ovn.org> Acked-by: Jesse Gross <jesse@kernel.org>
34 lines
653 B
C
34 lines
653 B
C
#ifndef __NET_NET_NAMESPACE_WRAPPER_H
|
|
#define __NET_NET_NAMESPACE_WRAPPER_H 1
|
|
|
|
#include_next <net/net_namespace.h>
|
|
|
|
#ifndef HAVE_POSSIBLE_NET_T
|
|
typedef struct {
|
|
#ifdef CONFIG_NET_NS
|
|
struct net *net;
|
|
#endif
|
|
} possible_net_t;
|
|
|
|
static inline void rpl_write_pnet(possible_net_t *pnet, struct net *net)
|
|
{
|
|
#ifdef CONFIG_NET_NS
|
|
pnet->net = net;
|
|
#endif
|
|
}
|
|
|
|
static inline struct net *rpl_read_pnet(const possible_net_t *pnet)
|
|
{
|
|
#ifdef CONFIG_NET_NS
|
|
return pnet->net;
|
|
#else
|
|
return &init_net;
|
|
#endif
|
|
}
|
|
#else /* Linux >= 4.1 */
|
|
#define rpl_read_pnet read_pnet
|
|
#define rpl_write_pnet write_pnet
|
|
#endif /* Linux >= 4.1 */
|
|
|
|
#endif /* net/net_namespace.h wrapper */
|