net: r8168: Fix build for Linux v6.5

The r8168 driver fails to build with Linux v6.5 because the
skb_gso_segment() is not found ...

 drivers/net/ethernet/realtek/r8168_n.c:29231:24: error: implicit
  declaration of function ‘skb_gso_segment’; did you mean
  ‘skb_gso_reset’? [-Werror=implicit-function-declaration]
      segs = skb_gso_segment(skb, features);
             ^~~~~~~~~~~~~~~

Commit d457a0e329b0 ("net: move gso declarations and functions to their
own files") moved the definition to a new file 'net/gso.h'. Fix this by
updating the conftest Makefile to check for the presence of this header
file and use the definition generated by conftest accordingly in the
r8168 driver.

Bug 4221847

Change-Id: I6ad83a06602ef0679a76ff1a6e5ddabbcb1bfe00
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990521
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2023-10-03 14:23:21 +01:00
committed by mobile promotions
parent e0b77a8761
commit 1c89d6b9cd
2 changed files with 6 additions and 1 deletions

View File

@@ -97,6 +97,10 @@
#include <linux/seq_file.h> #include <linux/seq_file.h>
#endif #endif
#if defined(NV_NET_GSO_H_PRESENT)
#include <net/gso.h>
#endif
#define FIRMWARE_8168D_1 "rtl_nic/rtl8168d-1.fw" #define FIRMWARE_8168D_1 "rtl_nic/rtl8168d-1.fw"
#define FIRMWARE_8168D_2 "rtl_nic/rtl8168d-2.fw" #define FIRMWARE_8168D_2 "rtl_nic/rtl8168d-2.fw"
#define FIRMWARE_8168E_1 "rtl_nic/rtl8168e-1.fw" #define FIRMWARE_8168E_1 "rtl_nic/rtl8168e-1.fw"

View File

@@ -135,7 +135,8 @@ NV_HEADER_PRESENCE_TESTS = \
drm/drm_dp_aux_bus.h \ drm/drm_dp_aux_bus.h \
generated/autoconf.h \ generated/autoconf.h \
linux/kconfig.h \ linux/kconfig.h \
linux/iosys-map.h linux/iosys-map.h \
net/gso.h
# Filename to store the define for the header in $(1); this is only consumed by # Filename to store the define for the header in $(1); this is only consumed by
# the rule below that concatenates all of these together. # the rule below that concatenates all of these together.