Message ID | 9203F9254D59FF19+20240804124841.71177-10-mengyuanlou@net-swift.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next,v5,01/10] net: libwx: Add malibox api for wangxun pf drivers | expand |
Hi Mengyuan,
kernel test robot noticed the following build errors:
[auto build test ERROR on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Mengyuan-Lou/net-libwx-Add-sriov-api-for-wangxun-nics/20240804-214836
base: net-next/main
patch link: https://lore.kernel.org/r/9203F9254D59FF19%2B20240804124841.71177-10-mengyuanlou%40net-swift.com
patch subject: [PATCH net-next v5 09/10] net: txgbe: add devlink and devlink port created
config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20240806/202408061505.h7AJKdXp-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240806/202408061505.h7AJKdXp-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408061505.h7AJKdXp-lkp@intel.com/
All errors (new ones prefixed by >>):
loongarch64-linux-ld: drivers/net/ethernet/wangxun/libwx/wx_devlink.o: in function `wx_devlink_free':
wx_devlink.c:(.text+0x58): undefined reference to `devlink_unregister'
loongarch64-linux-ld: wx_devlink.c:(.text+0x6c): undefined reference to `devlink_free'
loongarch64-linux-ld: drivers/net/ethernet/wangxun/libwx/wx_devlink.o: in function `wx_devlink_create_pf_port':
wx_devlink.c:(.text+0xa0): undefined reference to `priv_to_devlink'
loongarch64-linux-ld: wx_devlink.c:(.text+0xfc): undefined reference to `devlink_port_attrs_set'
loongarch64-linux-ld: wx_devlink.c:(.text+0x110): undefined reference to `devlink_port_register_with_ops'
loongarch64-linux-ld: drivers/net/ethernet/wangxun/libwx/wx_devlink.o: in function `wx_devlink_destroy_pf_port':
wx_devlink.c:(.text+0x174): undefined reference to `devl_port_unregister'
loongarch64-linux-ld: drivers/net/ethernet/wangxun/libwx/wx_devlink.o: in function `wx_create_devlink':
wx_devlink.c:(.text+0x2a0): undefined reference to `devlink_alloc_ns'
loongarch64-linux-ld: wx_devlink.c:(.text+0x2d4): undefined reference to `devlink_unregister'
loongarch64-linux-ld: wx_devlink.c:(.text+0x2dc): undefined reference to `devlink_free'
loongarch64-linux-ld: wx_devlink.c:(.text+0x304): undefined reference to `devlink_register'
loongarch64-linux-ld: wx_devlink.c:(.text+0x31c): undefined reference to `devlink_priv'
loongarch64-linux-ld: drivers/net/ethernet/wangxun/libwx/wx_devlink.o: in function `wx_devlink_create_vf_port':
wx_devlink.c:(.text+0x354): undefined reference to `priv_to_devlink'
loongarch64-linux-ld: wx_devlink.c:(.text+0x3d0): undefined reference to `devlink_port_attrs_set'
loongarch64-linux-ld: wx_devlink.c:(.text+0x3e8): undefined reference to `devl_port_register_with_ops'
loongarch64-linux-ld: drivers/net/ethernet/wangxun/libwx/wx_devlink.o: in function `wx_devlink_destroy_vf_port':
wx_devlink.c:(.text+0x47c): undefined reference to `devl_port_unregister'
loongarch64-linux-ld: drivers/net/ethernet/wangxun/libwx/wx_eswitch.o: in function `wx_eswitch_mode_set':
wx_eswitch.c:(.text+0x1c): undefined reference to `devlink_priv'
loongarch64-linux-ld: drivers/net/ethernet/wangxun/libwx/wx_eswitch.o: in function `wx_eswitch_mode_get':
wx_eswitch.c:(.text+0x138): undefined reference to `devlink_priv'
loongarch64-linux-ld: drivers/net/ethernet/wangxun/txgbe/txgbe_main.o: in function `txgbe_remove':
>> txgbe_main.c:(.text+0xf4): undefined reference to `devl_port_unregister'
loongarch64-linux-ld: drivers/net/ethernet/wangxun/txgbe/txgbe_main.o: in function `txgbe_probe':
txgbe_main.c:(.text+0x834): undefined reference to `devl_port_unregister'
diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c index c95d0611cf25..bf9756814f76 100644 --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c @@ -16,6 +16,7 @@ #include "../libwx/wx_hw.h" #include "../libwx/wx_mbx.h" #include "../libwx/wx_sriov.h" +#include "../libwx/wx_devlink.h" #include "txgbe_type.h" #include "txgbe_hw.h" #include "txgbe_phy.h" @@ -564,6 +565,13 @@ static int txgbe_probe(struct pci_dev *pdev, wx->netdev = netdev; wx->pdev = pdev; + wx->dl_priv = wx_create_devlink(&pdev->dev); + if (!wx->dl_priv) { + err = -ENOMEM; + goto err_pci_release_regions; + } + + wx->dl_priv->priv_wx = wx; wx->msg_enable = (1 << DEFAULT_DEBUG_LEVEL_SHIFT) - 1; wx->hw_addr = devm_ioremap(&pdev->dev, @@ -707,9 +715,14 @@ static int txgbe_probe(struct pci_dev *pdev, if (err) goto err_free_misc_irq; - err = register_netdev(netdev); + err = wx_devlink_create_pf_port(wx); if (err) goto err_remove_phy; + SET_NETDEV_DEVLINK_PORT(netdev, &wx->devlink_port); + + err = register_netdev(netdev); + if (err) + goto err_devlink_create_pf_port; pci_set_drvdata(pdev, wx); @@ -731,6 +744,8 @@ static int txgbe_probe(struct pci_dev *pdev, return 0; +err_devlink_create_pf_port: + devl_port_unregister(&wx->devlink_port); err_remove_phy: txgbe_remove_phy(txgbe); err_free_misc_irq: @@ -767,6 +782,7 @@ static void txgbe_remove(struct pci_dev *pdev) wx_disable_sriov(wx); unregister_netdev(netdev); + devl_port_unregister(&wx->devlink_port); txgbe_remove_phy(txgbe); txgbe_free_misc_irq(txgbe); wx_free_isb_resources(wx);
Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com> --- .../net/ethernet/wangxun/txgbe/txgbe_main.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)