[v2] kni:fix build failure as "ndo_change_mtu_rh74" not found in RHEL8
Checks
Commit Message
'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.
Build error log:
/home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct
net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean
‘ndo_change_mtu’?
#define ndo_change_mtu ndo_change_mtu_rh74
^~~~~~~~~~~~~~~~~~~
Signed-off-by: Xiao Liang <xiliang@redhat.com>
---
kernel/linux/kni/compat.h | 3 ++-
kernel/linux/kni/ethtool/igb/kcompat.h | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
Comments
On 12/19/2018 7:07 AM, Xiao Liang wrote:
> 'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.
>
> Build error log:
> /home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct
> net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean
> ‘ndo_change_mtu’?
> #define ndo_change_mtu ndo_change_mtu_rh74
There is already a patch for it:
https://patches.dpdk.org/patch/48343/
But that one doesn't cover igb, so I suggest to go with this one.
>
> ^~~~~~~~~~~~~~~~~~~
> Signed-off-by: Xiao Liang <xiliang@redhat.com>
<...>
On 12/19/2018 1:26 PM, Ferruh Yigit wrote:
> On 12/19/2018 7:07 AM, Xiao Liang wrote:
>> 'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.
>>
>> Build error log:
>> /home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct
>> net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean
>> ‘ndo_change_mtu’?
>> #define ndo_change_mtu ndo_change_mtu_rh74
>
> There is already a patch for it:
> https://patches.dpdk.org/patch/48343/
>
> But that one doesn't cover igb, so I suggest to go with this one.
cc'ed correct person (Mohammed) this time.
On 12/19/2018 7:07 AM, Xiao Liang wrote:
> 'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.
>
> Build error log:
> /home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct
> net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean
> ‘ndo_change_mtu’?
> #define ndo_change_mtu ndo_change_mtu_rh74
>
> ^~~~~~~~~~~~~~~~~~~
> Signed-off-by: Xiao Liang <xiliang@redhat.com>
Suggested title: 'kni: fix build on RHEL 8'
And a request to backport:
Cc: stable@dpdk.org
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
19/12/2018 14:47, Ferruh Yigit:
> On 12/19/2018 7:07 AM, Xiao Liang wrote:
> > 'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.
> >
> > Build error log:
> > /home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct
> > net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean
> > ‘ndo_change_mtu’?
> > #define ndo_change_mtu ndo_change_mtu_rh74
> >
> > ^~~~~~~~~~~~~~~~~~~
> > Signed-off-by: Xiao Liang <xiliang@redhat.com>
>
> Suggested title: 'kni: fix build on RHEL 8'
>
> And a request to backport:
> Cc: stable@dpdk.org
>
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied, thanks
@@ -103,7 +103,8 @@
#endif
#if (defined(RHEL_RELEASE_CODE) && \
- (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)))
+ (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+ (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
#define ndo_change_mtu ndo_change_mtu_rh74
#endif
@@ -3930,7 +3930,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
#endif
#if (defined(RHEL_RELEASE_CODE) && \
- (RHEL_RELEASE_VERSION(7, 5) <= RHEL_RELEASE_CODE))
+ (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+ (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
#define ndo_change_mtu ndo_change_mtu_rh74
#endif