Subject: Re: [PATCH net-next 6/8] ipvlan: Support GSO for port -> ipvlan

From: kernel test robot <[email-masked]>
Date: Thu, 23 Oct 2025 04:55:18 +0800

Hi Dmitry,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Dmitry-Skorodumov/ipvlan-Implement-learnable-L2-bridge/20251021-224923
base:   net-next/main
patch link:    https://lore.kernel.org/r/20251021144410.257905-7-skorodumov.dmitry%40huawei.com
patch subject: [PATCH net-next 6/8] ipvlan: Support GSO for port -> ipvlan
config: i386-buildonly-randconfig-004-20251023 (https://download.01.org/0day-ci/archive/20251023/[email-masked]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251023/[email-masked]/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 <[email-masked]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email-masked]/

All warnings (new ones prefixed by >>):

>> drivers/net/ipvlan/ipvlan_main.c:943:27: warning: variable 'ipvlan' is uninitialized when used here [-Wuninitialized]
     943 |                 if (ipvlan_is_learnable(ipvlan->port))
         |                                         ^~~~~~
   drivers/net/ipvlan/ipvlan_main.c:870:25: note: initialize the variable 'ipvlan' to silence this warning
     870 |         struct ipvl_dev *ipvlan, *next;
         |                                ^
         |                                 = NULL
   1 warning generated.

vim +/ipvlan +943 drivers/net/ipvlan/ipvlan_main.c

1fb81b882de575 Dmitry Skorodumov  2025-10-21  863  
2ad7bf3638411c Mahesh Bandewar    2014-11-23  864  static int ipvlan_device_event(struct notifier_block *unused,
2ad7bf3638411c Mahesh Bandewar    2014-11-23  865  			       unsigned long event, void *ptr)
2ad7bf3638411c Mahesh Bandewar    2014-11-23  866  {
61345fab484b97 Petr Machata       2018-12-13  867  	struct netlink_ext_ack *extack = netdev_notifier_info_to_extack(ptr);
61345fab484b97 Petr Machata       2018-12-13  868  	struct netdev_notifier_pre_changeaddr_info *prechaddr_info;
2ad7bf3638411c Mahesh Bandewar    2014-11-23  869  	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
2ad7bf3638411c Mahesh Bandewar    2014-11-23  870  	struct ipvl_dev *ipvlan, *next;
2ad7bf3638411c Mahesh Bandewar    2014-11-23  871  	struct ipvl_port *port;
2ad7bf3638411c Mahesh Bandewar    2014-11-23  872  	LIST_HEAD(lst_kill);
61345fab484b97 Petr Machata       2018-12-13  873  	int err;
2ad7bf3638411c Mahesh Bandewar    2014-11-23  874  
1fb81b882de575 Dmitry Skorodumov  2025-10-21  875  	if (event == NETDEV_DOWN && ipvlan_is_valid_dev(dev)) {
1fb81b882de575 Dmitry Skorodumov  2025-10-21  876  		struct ipvl_dev *ipvlan = netdev_priv(dev);
1fb81b882de575 Dmitry Skorodumov  2025-10-21  877  
1fb81b882de575 Dmitry Skorodumov  2025-10-21  878  		ipvlan_addrs_forget_all(ipvlan);
1fb81b882de575 Dmitry Skorodumov  2025-10-21  879  		return NOTIFY_DONE;
1fb81b882de575 Dmitry Skorodumov  2025-10-21  880  	}
1fb81b882de575 Dmitry Skorodumov  2025-10-21  881  
5933fea7aa7237 Mahesh Bandewar    2014-12-06  882  	if (!netif_is_ipvlan_port(dev))
2ad7bf3638411c Mahesh Bandewar    2014-11-23  883  		return NOTIFY_DONE;
2ad7bf3638411c Mahesh Bandewar    2014-11-23  884  
2ad7bf3638411c Mahesh Bandewar    2014-11-23  885  	port = ipvlan_port_get_rtnl(dev);
2ad7bf3638411c Mahesh Bandewar    2014-11-23  886  
2ad7bf3638411c Mahesh Bandewar    2014-11-23  887  	switch (event) {
57fb346cc7d0fc Di Zhu             2021-07-29  888  	case NETDEV_UP:
22978397083888 Venkat Venkatsubra 2024-04-05  889  	case NETDEV_DOWN:
2ad7bf3638411c Mahesh Bandewar    2014-11-23  890  	case NETDEV_CHANGE:
2ad7bf3638411c Mahesh Bandewar    2014-11-23  891  		list_for_each_entry(ipvlan, &port->ipvlans, pnode)
2ad7bf3638411c Mahesh Bandewar    2014-11-23  892  			netif_stacked_transfer_operstate(ipvlan->phy_dev,
2ad7bf3638411c Mahesh Bandewar    2014-11-23  893  							 ipvlan->dev);
2ad7bf3638411c Mahesh Bandewar    2014-11-23  894  		break;
2ad7bf3638411c Mahesh Bandewar    2014-11-23  895  
3133822f5ac13b Florian Westphal   2017-04-20  896  	case NETDEV_REGISTER: {
3133822f5ac13b Florian Westphal   2017-04-20  897  		struct net *oldnet, *newnet = dev_net(dev);
3133822f5ac13b Florian Westphal   2017-04-20  898  
3133822f5ac13b Florian Westphal   2017-04-20  899  		oldnet = read_pnet(&port->pnet);
3133822f5ac13b Florian Westphal   2017-04-20  900  		if (net_eq(newnet, oldnet))
3133822f5ac13b Florian Westphal   2017-04-20  901  			break;
3133822f5ac13b Florian Westphal   2017-04-20  902  
3133822f5ac13b Florian Westphal   2017-04-20  903  		write_pnet(&port->pnet, newnet);
3133822f5ac13b Florian Westphal   2017-04-20  904  
043d5f68d0ccdd Lu Wei             2023-08-17  905  		if (port->mode == IPVLAN_MODE_L3S)
c675e06a98a474 Daniel Borkmann    2019-02-08  906  			ipvlan_migrate_l3s_hook(oldnet, newnet);
3133822f5ac13b Florian Westphal   2017-04-20  907  		break;
3133822f5ac13b Florian Westphal   2017-04-20  908  	}
2ad7bf3638411c Mahesh Bandewar    2014-11-23  909  	case NETDEV_UNREGISTER:
2ad7bf3638411c Mahesh Bandewar    2014-11-23  910  		if (dev->reg_state != NETREG_UNREGISTERING)
2ad7bf3638411c Mahesh Bandewar    2014-11-23  911  			break;
2ad7bf3638411c Mahesh Bandewar    2014-11-23  912  
8230819494b3bf Paolo Abeni        2018-02-28  913  		list_for_each_entry_safe(ipvlan, next, &port->ipvlans, pnode)
2ad7bf3638411c Mahesh Bandewar    2014-11-23  914  			ipvlan->dev->rtnl_link_ops->dellink(ipvlan->dev,
2ad7bf3638411c Mahesh Bandewar    2014-11-23  915  							    &lst_kill);
2ad7bf3638411c Mahesh Bandewar    2014-11-23  916  		unregister_netdevice_many(&lst_kill);
2ad7bf3638411c Mahesh Bandewar    2014-11-23  917  		break;
2ad7bf3638411c Mahesh Bandewar    2014-11-23  918  
2ad7bf3638411c Mahesh Bandewar    2014-11-23  919  	case NETDEV_FEAT_CHANGE:
2ad7bf3638411c Mahesh Bandewar    2014-11-23  920  		list_for_each_entry(ipvlan, &port->ipvlans, pnode) {
6df6398f7c8b48 Jakub Kicinski     2022-05-05  921  			netif_inherit_tso_max(ipvlan->dev, dev);
d0f5c7076e01fe Mahesh Bandewar    2020-08-14  922  			netdev_update_features(ipvlan->dev);
2ad7bf3638411c Mahesh Bandewar    2014-11-23  923  		}
2ad7bf3638411c Mahesh Bandewar    2014-11-23  924  		break;
2ad7bf3638411c Mahesh Bandewar    2014-11-23  925  
2ad7bf3638411c Mahesh Bandewar    2014-11-23  926  	case NETDEV_CHANGEMTU:
2ad7bf3638411c Mahesh Bandewar    2014-11-23  927  		list_for_each_entry(ipvlan, &port->ipvlans, pnode)
2ad7bf3638411c Mahesh Bandewar    2014-11-23  928  			ipvlan_adjust_mtu(ipvlan, dev);
2ad7bf3638411c Mahesh Bandewar    2014-11-23  929  		break;
2ad7bf3638411c Mahesh Bandewar    2014-11-23  930  
61345fab484b97 Petr Machata       2018-12-13  931  	case NETDEV_PRE_CHANGEADDR:
61345fab484b97 Petr Machata       2018-12-13  932  		prechaddr_info = ptr;
61345fab484b97 Petr Machata       2018-12-13  933  		list_for_each_entry(ipvlan, &port->ipvlans, pnode) {
0413a34ef678c3 Stanislav Fomichev 2025-07-17  934  			err = netif_pre_changeaddr_notify(ipvlan->dev,
61345fab484b97 Petr Machata       2018-12-13  935  							  prechaddr_info->dev_addr,
61345fab484b97 Petr Machata       2018-12-13  936  							  extack);
61345fab484b97 Petr Machata       2018-12-13  937  			if (err)
61345fab484b97 Petr Machata       2018-12-13  938  				return notifier_from_errno(err);
61345fab484b97 Petr Machata       2018-12-13  939  		}
61345fab484b97 Petr Machata       2018-12-13  940  		break;
61345fab484b97 Petr Machata       2018-12-13  941  
32c10bbfe914c7 Mahesh Bandewar    2017-10-11  942  	case NETDEV_CHANGEADDR:
711f25b2660608 Dmitry Skorodumov  2025-10-21 @943  		if (ipvlan_is_learnable(ipvlan->port))
711f25b2660608 Dmitry Skorodumov  2025-10-21  944  			break;
711f25b2660608 Dmitry Skorodumov  2025-10-21  945  
ab452c3ce7bacb Keefe Liu          2018-05-14  946  		list_for_each_entry(ipvlan, &port->ipvlans, pnode) {
e35b8d7dbb094c Jakub Kicinski     2021-10-01  947  			eth_hw_addr_set(ipvlan->dev, dev->dev_addr);
ab452c3ce7bacb Keefe Liu          2018-05-14  948  			call_netdevice_notifiers(NETDEV_CHANGEADDR, ipvlan->dev);
ab452c3ce7bacb Keefe Liu          2018-05-14  949  		}
32c10bbfe914c7 Mahesh Bandewar    2017-10-11  950  		break;
32c10bbfe914c7 Mahesh Bandewar    2017-10-11  951  
2ad7bf3638411c Mahesh Bandewar    2014-11-23  952  	case NETDEV_PRE_TYPE_CHANGE:
2ad7bf3638411c Mahesh Bandewar    2014-11-23  953  		/* Forbid underlying device to change its type. */
2ad7bf3638411c Mahesh Bandewar    2014-11-23  954  		return NOTIFY_BAD;
e79a98e68b96a9 Etienne Champetier 2025-01-08  955  
e79a98e68b96a9 Etienne Champetier 2025-01-08  956  	case NETDEV_NOTIFY_PEERS:
e79a98e68b96a9 Etienne Champetier 2025-01-08  957  	case NETDEV_BONDING_FAILOVER:
e79a98e68b96a9 Etienne Champetier 2025-01-08  958  	case NETDEV_RESEND_IGMP:
e79a98e68b96a9 Etienne Champetier 2025-01-08  959  		list_for_each_entry(ipvlan, &port->ipvlans, pnode)
e79a98e68b96a9 Etienne Champetier 2025-01-08  960  			call_netdevice_notifiers(event, ipvlan->dev);
2ad7bf3638411c Mahesh Bandewar    2014-11-23  961  	}
2ad7bf3638411c Mahesh Bandewar    2014-11-23  962  	return NOTIFY_DONE;
2ad7bf3638411c Mahesh Bandewar    2014-11-23  963  }
2ad7bf3638411c Mahesh Bandewar    2014-11-23  964  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki