Message ID | 1508753010-10643-1-git-send-email-ganeshgr@chelsio.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
Series | [net-next] cxgb4vf: Fix netdev_features flag | expand |
From: Ganesh Goudar <ganeshgr@chelsio.com> Date: Mon, 23 Oct 2017 15:33:30 +0530 > From: Arjun Vynipadath <arjun@chelsio.com> > > GRO is not supported by Chelsio HW when rx_csum is disabled. > Update the netdev features flag when rx_csum is modified. > > Signed-off-by: Arjun Vynipadath <arjun@chelsio.com> > Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> This doesn't even compile: CC [M] drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.o drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c:2765:26: error: redefinition of ‘cxgb4vf_fix_features’ static netdev_features_t cxgb4vf_fix_features(struct net_device *dev, ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c:1114:26: note: previous definition of ‘cxgb4vf_fix_features’ was here static netdev_features_t cxgb4vf_fix_features(struct net_device *dev, ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c:1114:26: warning: ‘cxgb4vf_fix_features’ defined but not used [-Wunused-function] scripts/Makefile.build:313: recipe for target 'drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.o' failed make[1]: *** [drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.o] Error 1 Makefile:1653: recipe for target 'drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.o' failed make: *** [drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.o] Error 2
Hi Arjun, [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Ganesh-Goudar/cxgb4vf-Fix-netdev_features-flag/20171023-201033 config: xtensa-allyesconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=xtensa All errors (new ones prefixed by >>): >> drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c:2765:26: error: redefinition of 'cxgb4vf_fix_features' static netdev_features_t cxgb4vf_fix_features(struct net_device *dev, ^ drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c:1114:26: note: previous definition of 'cxgb4vf_fix_features' was here static netdev_features_t cxgb4vf_fix_features(struct net_device *dev, ^ drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c:1114:26: warning: 'cxgb4vf_fix_features' defined but not used [-Wunused-function] vim +/cxgb4vf_fix_features +2765 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c 2764 > 2765 static netdev_features_t cxgb4vf_fix_features(struct net_device *dev, 2766 netdev_features_t features) 2767 { 2768 /* Disable GRO, if RX_CSUM is disabled */ 2769 if (!(features & NETIF_F_RXCSUM)) 2770 features &= ~NETIF_F_GRO; 2771 2772 return features; 2773 } 2774 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c index 8996ebb..d6d26bf 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c @@ -2762,6 +2762,16 @@ static int enable_msix(struct adapter *adapter) return 0; } +static netdev_features_t cxgb4vf_fix_features(struct net_device *dev, + netdev_features_t features) +{ + /* Disable GRO, if RX_CSUM is disabled */ + if (!(features & NETIF_F_RXCSUM)) + features &= ~NETIF_F_GRO; + + return features; +} + static const struct net_device_ops cxgb4vf_netdev_ops = { .ndo_open = cxgb4vf_open, .ndo_stop = cxgb4vf_stop, @@ -2777,6 +2787,7 @@ static const struct net_device_ops cxgb4vf_netdev_ops = { #ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = cxgb4vf_poll_controller, #endif + .ndo_fix_features = cxgb4vf_fix_features, }; /*