Update kernel drivers to compile with newer kernel

Kernel update to CentOS 7.5 versions are to be paired with updated
out-of-tree kernel modules, mostly for compilation purposes.

Depends-On:  https://review.openstack.org/580689

Change-Id: I8eb21d087f5bda7483e21f2cb769b310c13e908d
Signed-off-by: Jason McKenna <jason.mckenna@windriver.com>
Story: 2002761
Task: 22841
This commit is contained in:
jmckenna 2018-07-06 08:38:34 -04:00
parent 0436f37bf0
commit 67202ded0a
16 changed files with 214 additions and 38 deletions

View File

@ -1,4 +1,4 @@
COPY_LIST="$FILES_BASE/* \
$DISTRO/patches/* \
$CGCS_BASE/downloads/drbd-8.4.7-1.tar.gz"
TIS_PATCH_VER=3
TIS_PATCH_VER=4

View File

@ -25,6 +25,7 @@ Source0: http://oss.linbit.com/drbd/drbd-%{tarball_version}.tar.gz
# WRS
Patch0001: 0001-remove_bind_before_connect_error.patch
Patch0002: compat-Statically-initialize-families.patch
%define kversion %(rpm -q kernel%{?bt_ext}-devel | sort --version-sort | tail -1 | sed 's/kernel%{?bt_ext}-devel-//')
@ -85,6 +86,7 @@ echo "Done."
%prep
%setup -q -n drbd-%{tarball_version}
%patch0001 -p1
%patch0002 -p1
%build
rm -rf obj

View File

@ -0,0 +1,171 @@
From 7510d78909774e33b64ada4055bea65881350763 Mon Sep 17 00:00:00 2001
Message-Id: <7510d78909774e33b64ada4055bea65881350763.1528136610.git.Jim.Somerville@windriver.com>
From: Nick Wang <nwang@suse.com>
Date: Mon, 13 Mar 2017 15:23:29 +0800
Subject: [PATCH 1/1] compat: Statically initialize families
In a07ea4d9, genetlink no longer use static family id.
GENL_ID_GENERATE is removed.
In 489111e5, statically initialize the families and remove
the inline functions.
Thanks to Nick Wang <nwang@suse.com> for preparing a first draft.
Unfortunately this version actually broke netlink on v4.10. Probably
only compile-tested, but never "drbdadm up" tested.
Signed-off-by: Nick Wang <nwang@suse.com>
[add missing pieces introduced in 489111e5]
Signed-off-by: Roland Kammerer <roland.kammerer@linbit.com>
[Simplified :-) and backported to drbd 8.4]
Signed-off-by: Lars Ellenberg <lars@linbit.com>
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
---
.../tests/have_genl_family_in_genlmsg_multicast.c | 9 ++++++
drbd/compat/tests/have_genl_id_generate.c | 6 ++++
.../tests/have_genl_register_family_with_ops.c | 9 ++++++
.../tests/have_genl_register_family_with_ops3.c | 9 ++++++
...gic_func-genl_register_family_with_ops_groups.h | 4 +++
drbd/linux/genl_magic_func.h | 34 +++++++++++++++-------
6 files changed, 61 insertions(+), 10 deletions(-)
create mode 100644 drbd/compat/tests/have_genl_family_in_genlmsg_multicast.c
create mode 100644 drbd/compat/tests/have_genl_id_generate.c
create mode 100644 drbd/compat/tests/have_genl_register_family_with_ops.c
create mode 100644 drbd/compat/tests/have_genl_register_family_with_ops3.c
diff --git a/drbd/compat/tests/have_genl_family_in_genlmsg_multicast.c b/drbd/compat/tests/have_genl_family_in_genlmsg_multicast.c
new file mode 100644
index 0000000..6d44faa
--- /dev/null
+++ b/drbd/compat/tests/have_genl_family_in_genlmsg_multicast.c
@@ -0,0 +1,9 @@
+#include <net/genetlink.h>
+
+void test(void)
+{
+ struct genl_family family = { };
+ struct sk_buff *skb = NULL;
+
+ genlmsg_multicast(&family, skb, 0, 0, GFP_KERNEL);
+}
diff --git a/drbd/compat/tests/have_genl_id_generate.c b/drbd/compat/tests/have_genl_id_generate.c
new file mode 100644
index 0000000..4ef0e8e
--- /dev/null
+++ b/drbd/compat/tests/have_genl_id_generate.c
@@ -0,0 +1,6 @@
+#include <linux/genetlink.h>
+
+void test(void)
+{
+ int i = GENL_ID_GENERATE;
+}
diff --git a/drbd/compat/tests/have_genl_register_family_with_ops.c b/drbd/compat/tests/have_genl_register_family_with_ops.c
new file mode 100644
index 0000000..27123db
--- /dev/null
+++ b/drbd/compat/tests/have_genl_register_family_with_ops.c
@@ -0,0 +1,9 @@
+#include <net/genetlink.h>
+
+void test(void)
+{
+ struct genl_family family = { };
+ struct genl_ops ops[23];
+
+ genl_register_family_with_ops(&family, ops);
+}
diff --git a/drbd/compat/tests/have_genl_register_family_with_ops3.c b/drbd/compat/tests/have_genl_register_family_with_ops3.c
new file mode 100644
index 0000000..11b6d73
--- /dev/null
+++ b/drbd/compat/tests/have_genl_register_family_with_ops3.c
@@ -0,0 +1,9 @@
+#include <net/genetlink.h>
+
+void test(void)
+{
+ struct genl_family family = { };
+ struct genl_ops ops[23];
+
+ genl_register_family_with_ops(&family, ops, 23);
+}
diff --git a/drbd/linux/genl_magic_func-genl_register_family_with_ops_groups.h b/drbd/linux/genl_magic_func-genl_register_family_with_ops_groups.h
index 27d8f73..403e8e2 100644
--- a/drbd/linux/genl_magic_func-genl_register_family_with_ops_groups.h
+++ b/drbd/linux/genl_magic_func-genl_register_family_with_ops_groups.h
@@ -29,9 +29,13 @@ static int CONCAT_(GENL_MAGIC_FAMILY, _genl_multicast_ ## group)( \
int CONCAT_(GENL_MAGIC_FAMILY, _genl_register)(void)
{
+#if defined(COMPAT_HAVE_GENL_REGISTER_FAMILY_WITH_OPS) || defined(COMPAT_HAVE_GENL_REGISTER_FAMILY_WITH_OPS3)
return genl_register_family_with_ops_groups(&ZZZ_genl_family, \
ZZZ_genl_ops, \
ZZZ_genl_mcgrps);
+#else
+ return genl_register_family(&ZZZ_genl_family);
+#endif
}
void CONCAT_(GENL_MAGIC_FAMILY, _genl_unregister)(void)
diff --git a/drbd/linux/genl_magic_func.h b/drbd/linux/genl_magic_func.h
index 29f44a8..504719a 100644
--- a/drbd/linux/genl_magic_func.h
+++ b/drbd/linux/genl_magic_func.h
@@ -261,15 +261,7 @@ static struct genl_ops ZZZ_genl_ops[] __read_mostly = {
* {{{2
*/
#define ZZZ_genl_family CONCAT_(GENL_MAGIC_FAMILY, _genl_family)
-static struct genl_family ZZZ_genl_family __read_mostly = {
- .id = GENL_ID_GENERATE,
- .name = __stringify(GENL_MAGIC_FAMILY),
- .version = GENL_MAGIC_VERSION,
-#ifdef GENL_MAGIC_FAMILY_HDRSZ
- .hdrsize = NLA_ALIGN(GENL_MAGIC_FAMILY_HDRSZ),
-#endif
- .maxattr = ARRAY_SIZE(drbd_tla_nl_policy)-1,
-};
+static struct genl_family ZZZ_genl_family;
/*
* Magic: define multicast groups
@@ -282,13 +274,35 @@ static struct genl_family ZZZ_genl_family __read_mostly = {
* genetlink: pass family to functions using groups
* genetlink: only pass array to genl_register_family_with_ops()
* which are commits c53ed742..2a94fe48
+ *
+ * v4.10, 489111e5 genetlink: statically initialize families
+ * and previous commit drop GENL_ID_GENERATE and register helper functions.
*/
-#ifdef genl_register_family_with_ops_groups
+#if defined(genl_register_family_with_ops_groups) || !defined(GENL_ID_GENERATE)
#include <linux/genl_magic_func-genl_register_family_with_ops_groups.h>
#else
#include <linux/genl_magic_func-genl_register_mc_group.h>
#endif
+static struct genl_family ZZZ_genl_family __read_mostly = {
+ /* .id = GENL_ID_GENERATE, which exists no longer, and was 0 anyways */
+ .name = __stringify(GENL_MAGIC_FAMILY),
+ .version = GENL_MAGIC_VERSION,
+#ifdef GENL_MAGIC_FAMILY_HDRSZ
+ .hdrsize = NLA_ALIGN(GENL_MAGIC_FAMILY_HDRSZ),
+#endif
+ .maxattr = ARRAY_SIZE(CONCAT_(GENL_MAGIC_FAMILY, _tla_nl_policy))-1,
+
+#ifndef GENL_ID_GENERATE
+ .ops = ZZZ_genl_ops,
+ .n_ops = ARRAY_SIZE(ZZZ_genl_ops),
+ .mcgrps = ZZZ_genl_mcgrps,
+ .n_mcgrps = ARRAY_SIZE(ZZZ_genl_mcgrps),
+ .module = THIS_MODULE,
+#endif
+};
+
+
/*
* Magic: provide conversion functions {{{1
* populate skb from struct.
--
1.8.3.1

View File

@ -1,4 +1,4 @@
COPY_LIST=" \
$PKG_BASE/files/* \
$STX_BASE/downloads/e1000e-3.3.6.tar.gz"
$STX_BASE/downloads/e1000e-3.4.1.1.tar.gz"
TIS_PATCH_VER=1

View File

@ -8,7 +8,7 @@
%define kmod_name e1000e
Name: %{kmod_name}-kmod%{?bt_ext}
Version: 3.3.6
Version: 3.4.1.1
Release: 0%{?_tis_dist}.%{tis_patch_ver}
Group: System Environment/Kernel
License: GPLv2

View File

@ -1,4 +1,4 @@
COPY_LIST=" \
$PKG_BASE/files/* \
$STX_BASE/downloads/i40e-2.4.3.tar.gz"
TIS_PATCH_VER=6
$STX_BASE/downloads/i40e-2.4.10.tar.gz"
TIS_PATCH_VER=1

View File

@ -8,7 +8,7 @@
%define kmod_name i40e
Name: %{kmod_name}-kmod%{?bt_ext}
Version: 2.4.3
Version: 2.4.10
Release: 0%{?_tis_dist}.%{tis_patch_ver}
Group: System Environment/Kernel
License: GPLv2

View File

@ -1,7 +1,8 @@
From 71b273f39c927e5e4b4ea196f17106c147cd0804 Mon Sep 17 00:00:00 2001
From 412fdc8c0d51500e42e76e788ece3ca7dd260ced Mon Sep 17 00:00:00 2001
Message-Id: <412fdc8c0d51500e42e76e788ece3ca7dd260ced.1528830095.git.Jim.Somerville@windriver.com>
From: Vadim Suraev <vsuraev@northforgeinc.com>
Date: Mon, 8 Feb 2016 15:57:30 -0500
Subject: [PATCH 1/2] i40e: Enable getting link status from VF
Subject: [PATCH 1/3] i40e: Enable getting link status from VF
Add handling of custom OP code sent from the PMD VF to get link status via the
virtual channel interface.
@ -15,7 +16,7 @@ Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
2 files changed, 79 insertions(+)
diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c
index aba23f2..7081123 100644
index 020bacb..126ec19 100644
--- a/src/i40e_virtchnl_pf.c
+++ b/src/i40e_virtchnl_pf.c
@@ -1857,6 +1857,81 @@ error_param:
@ -100,7 +101,7 @@ index aba23f2..7081123 100644
/**
* i40e_vc_config_queues_msg
* @vf: pointer to the VF info
@@ -2839,6 +2914,9 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode,
@@ -2901,6 +2976,9 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode,
case VIRTCHNL_OP_REQUEST_QUEUES:
ret = i40e_vc_request_queues_msg(vf, msg, msglen);
break;
@ -111,7 +112,7 @@ index aba23f2..7081123 100644
case VIRTCHNL_OP_UNKNOWN:
default:
diff --git a/src/virtchnl.h b/src/virtchnl.h
index c550261..950d24e 100644
index afde603..b9b38c0 100644
--- a/src/virtchnl.h
+++ b/src/virtchnl.h
@@ -133,6 +133,7 @@ enum virtchnl_ops {

View File

@ -1,10 +1,10 @@
From bbe1571bb970759e8e2049512a52461da4c095b2 Mon Sep 17 00:00:00 2001
Message-Id: <bbe1571bb970759e8e2049512a52461da4c095b2.1522076866.git.Jim.Somerville@windriver.com>
In-Reply-To: <bc463ee30c5bc2ccc2d9541b20279e933d5fc462.1522076866.git.Jim.Somerville@windriver.com>
References: <bc463ee30c5bc2ccc2d9541b20279e933d5fc462.1522076866.git.Jim.Somerville@windriver.com>
From d60e87567eb5418fbb848bf30f72d3d8bec3bad6 Mon Sep 17 00:00:00 2001
Message-Id: <d60e87567eb5418fbb848bf30f72d3d8bec3bad6.1528830095.git.Jim.Somerville@windriver.com>
In-Reply-To: <412fdc8c0d51500e42e76e788ece3ca7dd260ced.1528830095.git.Jim.Somerville@windriver.com>
References: <412fdc8c0d51500e42e76e788ece3ca7dd260ced.1528830095.git.Jim.Somerville@windriver.com>
From: Jim Somerville <Jim.Somerville@windriver.com>
Date: Mon, 26 Mar 2018 11:03:47 -0400
Subject: [PATCH 2/2] i40e add more debug info for VFs still in reset
Subject: [PATCH 2/3] i40e add more debug info for VFs still in reset
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
---
@ -12,12 +12,12 @@ Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c
index 7081123..83f6f88 100644
index 126ec19..da29fc3 100644
--- a/src/i40e_virtchnl_pf.c
+++ b/src/i40e_virtchnl_pf.c
@@ -3004,8 +3004,8 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
vf = &(pf->vf[vf_id]);
vsi = pf->vsi[vf->lan_vsi_idx];
@@ -3077,8 +3077,8 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
msleep(20);
}
if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) {
- dev_err(&pf->pdev->dev, "VF %d still in reset. Try again.\n",
- vf_id);
@ -26,7 +26,7 @@ index 7081123..83f6f88 100644
ret = -EAGAIN;
goto error_param;
}
@@ -3145,8 +3145,8 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,
@@ -3218,8 +3218,8 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,
vf = &(pf->vf[vf_id]);
vsi = pf->vsi[vf->lan_vsi_idx];
if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) {
@ -37,7 +37,7 @@ index 7081123..83f6f88 100644
ret = -EAGAIN;
goto error_pvid;
}
@@ -3277,8 +3277,8 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int max_tx_rate)
@@ -3350,8 +3350,8 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int max_tx_rate)
vf = &(pf->vf[vf_id]);
vsi = pf->vsi[vf->lan_vsi_idx];
if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) {
@ -48,7 +48,7 @@ index 7081123..83f6f88 100644
ret = -EAGAIN;
goto error;
}
@@ -3370,8 +3370,8 @@ int i40e_ndo_get_vf_config(struct net_device *netdev,
@@ -3443,8 +3443,8 @@ int i40e_ndo_get_vf_config(struct net_device *netdev,
/* first vsi is always the LAN vsi */
vsi = pf->vsi[vf->lan_vsi_idx];
if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) {
@ -59,7 +59,7 @@ index 7081123..83f6f88 100644
ret = -EAGAIN;
goto error_param;
}
@@ -3503,8 +3503,8 @@ int i40e_ndo_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool enable)
@@ -3576,8 +3576,8 @@ int i40e_ndo_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool enable)
vf = &(pf->vf[vf_id]);
if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) {

View File

@ -1,8 +1,10 @@
From 3147c6198571464749af94f0fbf6986a932ed8c7 Mon Sep 17 00:00:00 2001
Message-Id: <3147c6198571464749af94f0fbf6986a932ed8c7.1522697994.git.Jim.Somerville@windriver.com>
From 25b521f58b33bf070c0b31d077333c13c3ad25e8 Mon Sep 17 00:00:00 2001
Message-Id: <25b521f58b33bf070c0b31d077333c13c3ad25e8.1528830095.git.Jim.Somerville@windriver.com>
In-Reply-To: <412fdc8c0d51500e42e76e788ece3ca7dd260ced.1528830095.git.Jim.Somerville@windriver.com>
References: <412fdc8c0d51500e42e76e788ece3ca7dd260ced.1528830095.git.Jim.Somerville@windriver.com>
From: Jim Somerville <Jim.Somerville@windriver.com>
Date: Mon, 2 Apr 2018 15:35:12 -0400
Subject: [PATCH 1/1] ndo_get_vf_config poll for out of vf reset
Subject: [PATCH 3/3] ndo_get_vf_config poll for out of vf reset
Same solution as 028daf80117376b22909becd9720daaefdfceff4 from the
net-next tree as supplied by Intel, but we apply it to
@ -14,10 +16,10 @@ Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
1 file changed, 11 insertions(+)
diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c
index 83f6f88..6f749b6 100644
index da29fc3..d5935d6 100644
--- a/src/i40e_virtchnl_pf.c
+++ b/src/i40e_virtchnl_pf.c
@@ -3358,6 +3358,7 @@ int i40e_ndo_get_vf_config(struct net_device *netdev,
@@ -3431,6 +3431,7 @@ int i40e_ndo_get_vf_config(struct net_device *netdev,
struct i40e_pf *pf = vsi->back;
struct i40e_vf *vf;
int ret = 0;
@ -25,7 +27,7 @@ index 83f6f88..6f749b6 100644
/* validate the request */
if (vf_id >= pf->num_alloc_vfs) {
@@ -3369,6 +3370,16 @@ int i40e_ndo_get_vf_config(struct net_device *netdev,
@@ -3442,6 +3443,16 @@ int i40e_ndo_get_vf_config(struct net_device *netdev,
vf = &(pf->vf[vf_id]);
/* first vsi is always the LAN vsi */
vsi = pf->vsi[vf->lan_vsi_idx];

View File

@ -1,4 +1,4 @@
COPY_LIST=" \
$PKG_BASE/files/* \
$STX_BASE/downloads/i40evf-3.4.2.tar.gz"
TIS_PATCH_VER=4
$STX_BASE/downloads/i40evf-3.5.13.tar.gz"
TIS_PATCH_VER=1

View File

@ -8,7 +8,7 @@
%define kmod_name i40evf
Name: %{kmod_name}-kmod%{?bt_ext}
Version: 3.4.2
Version: 3.5.13
Release: 0%{?_tis_dist}.%{tis_patch_ver}
Group: System Environment/Kernel
License: GPLv2

View File

@ -1,4 +1,4 @@
COPY_LIST=" \
$PKG_BASE/files/* \
$STX_BASE/downloads/ixgbe-5.2.3.tar.gz"
TIS_PATCH_VER=2
$STX_BASE/downloads/ixgbe-5.3.7.tar.gz"
TIS_PATCH_VER=1

View File

@ -8,7 +8,7 @@
%define kmod_name ixgbe
Name: %{kmod_name}-kmod%{?bt_ext}
Version: 5.2.3
Version: 5.3.7
Release: 0%{?_tis_dist}.%{tis_patch_ver}
Group: System Environment/Kernel
License: GPLv2

View File

@ -1,4 +1,4 @@
COPY_LIST=" \
$PKG_BASE/files/* \
$STX_BASE/downloads/ixgbevf-4.2.1.tar.gz"
$STX_BASE/downloads/ixgbevf-4.3.5.tar.gz"
TIS_PATCH_VER=2

View File

@ -8,7 +8,7 @@
%define kmod_name ixgbevf
Name: %{kmod_name}-kmod%{?bt_ext}
Version: 4.2.1
Version: 4.3.5
Release: 0%{?_tis_dist}.%{tis_patch_ver}
Group: System Environment/Kernel
License: GPLv2