[v2] kni: fix build on RHEL 7.5

Message ID 1533816546-1626-1-git-send-email-quzeyao@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v2] kni: fix build on RHEL 7.5 |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

ZY Qiu Aug. 9, 2018, 12:09 p.m. UTC
  This patch fixes compilation errors on Centos 7.5 when
CONFIG_RTE_KNI_KMOD_ETHTOOL is set to 'y'.
On RHEL75 ndo_change_mtu has changed to ndo_change_mtu_rh74.

See commit 37d477b6863e5c06 ("kni: fix build on RHEL 7.5")

Signed-off-by: Drocula Lambda <quzeyao@gmail.com>
---
 kernel/linux/kni/ethtool/igb/kcompat.h | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Ferruh Yigit Aug. 9, 2018, 12:15 p.m. UTC | #1
On 8/9/2018 1:09 PM, Drocula wrote:
> This patch fixes compilation errors on Centos 7.5 when
> CONFIG_RTE_KNI_KMOD_ETHTOOL is set to 'y'.
> On RHEL75 ndo_change_mtu has changed to ndo_change_mtu_rh74.
> 
> See commit 37d477b6863e5c06 ("kni: fix build on RHEL 7.5")
> 
> Signed-off-by: Drocula Lambda <quzeyao@gmail.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Thomas Monjalon Aug. 9, 2018, 2:03 p.m. UTC | #2
> Signed-off-by: Drocula Lambda <quzeyao@gmail.com>

I am not sure we should accept anonymous authors.
Does it really comply with https://developercertificate.org/ ?
  
Thomas Monjalon Aug. 9, 2018, 2:10 p.m. UTC | #3
09/08/2018 14:15, Ferruh Yigit:
> On 8/9/2018 1:09 PM, Drocula wrote:
> > This patch fixes compilation errors on Centos 7.5 when
> > CONFIG_RTE_KNI_KMOD_ETHTOOL is set to 'y'.
> > On RHEL75 ndo_change_mtu has changed to ndo_change_mtu_rh74.
> > 
> > See commit 37d477b6863e5c06 ("kni: fix build on RHEL 7.5")
> > 
> > Signed-off-by: Drocula Lambda <quzeyao@gmail.com>

I am pretty sure this is not a real name.
As it is a small patch, I will forgive it.

> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks
  
Stephen Hemminger Aug. 9, 2018, 5:10 p.m. UTC | #4
On Thu, 09 Aug 2018 16:03:15 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:

> > Signed-off-by: Drocula Lambda <quzeyao@gmail.com>  
> 
> I am not sure we should accept anonymous authors.
> Does it really comply with https://developercertificate.org/ ?
> 
> 
> 

No we can't accept patches from pseudonym's. DCO is a legal signature
and made up names don't count.

Kernel community went through this with Solar Designer as I remember.
  

Patch

diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index 40a8d99..ae1b530 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3929,6 +3929,11 @@  static inline struct sk_buff *__kc__vlan_hwaccel_put_tag(struct sk_buff *skb,
 #endif
 #endif
 
+#if (defined(RHEL_RELEASE_CODE) && \
+	(RHEL_RELEASE_VERSION(7, 5) <= RHEL_RELEASE_CODE))
+#define ndo_change_mtu ndo_change_mtu_rh74
+#endif
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
 #define HAVE_PCI_ENABLE_MSIX
 #endif