rhel7.6: Support kmod build and load for mulitple kernel versions
RHEL 7.6's new kernel 3.10.0-957.12.1.el7 introduced some ABI changes.
This leads to an issue that OVS kernel module built against
kernels newer than 12.1 cannot be loaded on systems running kernels
older than 12.1, vice versa.
By inspecting datapath/linux/openvswitch.mod.c, signatures of
the following kernel functions have changed in 3.10.0-957.12.1.el7:
nf_ct_get_tuple
nf_ct_invert_tuplepr
__nf_ct_l4proto_find
This patch enables OVS to build kernel modules against multiple
kernel versions and enables RHEL 7.6 system to load the compatible
module at runtime.
make rpm-fedora-kmod \
RPMBUILD_OPT='-D "kversion 3.10.0-957.10.1.el7.x86_64 \
3.10.0-957.12.1.el7.x86_64"'
Acked-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>