[ovs-dev] [PATCH] Fix datapath compilation on RHEL >= 7.5
Gregory Rose
gvrose8192 at gmail.com
Thu May 10 21:15:36 UTC 2018
On 5/10/2018 7:11 AM, Daniel Alvarez wrote:
> On RHEL 7.5 we get compilation errors due to field ndo_change_mtu
> missing. This patch checks the RHEL version and redefines it to
> ndo_change_mtu_rh74.
>
> Reported-by: Lucas Alvares <lucasagomes at gmail.com>
> Signed-off-by: Daniel Alvarez <dalvarez at redhat.com>
> ---
> datapath/datapath.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/datapath/datapath.h b/datapath/datapath.h
> index 93c9ed505..d418bf381 100644
> --- a/datapath/datapath.h
> +++ b/datapath/datapath.h
> @@ -25,6 +25,7 @@
> #include <linux/netdevice.h>
> #include <linux/skbuff.h>
> #include <linux/u64_stats_sync.h>
> +#include <linux/version.h>
> #include <net/net_namespace.h>
> #include <net/ip_tunnels.h>
>
> @@ -36,6 +37,10 @@
> #define DP_MAX_PORTS USHRT_MAX
> #define DP_VPORT_HASH_BUCKETS 1024
>
> +#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,5)
> +#define ndo_change_mtu ndo_change_mtu_rh74
> +#endif
> +
> /**
> * struct dp_stats_percpu - per-cpu packet processing statistics for a given
> * datapath.
There are dueling patches for this. I think the one posted by Yi-hung
is a bit more complete because it doesn't just check version numbers.
Thanks,
- Greg
More information about the dev
mailing list