All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Heng Qi <hengqi@linux.alibaba.com>
Cc: kernel test robot <lkp@intel.com>,
	oe-kbuild-all@lists.linux.dev, Jakub Kicinski <kuba@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	Jason Wang <jasowang@redhat.com>,
	Brett Creeley <bcreeley@amd.com>,
	Ratheesh Kannoth <rkannoth@marvell.com>,
	Alexander Lobakin <aleksander.lobakin@intel.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	Tal Gilboa <talgi@nvidia.com>, Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Paul Greenwalt <paul.greenwalt@intel.com>,
	Ahmed Zaki <ahmed.zaki@intel.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Kory Maincent <kory.maincent@bootlin.com>,
	Andrew Lunn <andrew@lunn.ch>,
	justinstitt@google.com, netdev@vger.kernel.org,
	virtualization@lists.linux.dev
Subject: Re: [PATCH net-next v11 2/4] ethtool: provide customized dim profile management
Date: Wed, 1 May 2024 01:55:47 -0400	[thread overview]
Message-ID: <20240501015303-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1714538736.2472136-1-hengqi@linux.alibaba.com>

On Wed, May 01, 2024 at 12:45:36PM +0800, Heng Qi wrote:
> On Wed, 1 May 2024 10:36:03 +0800, kernel test robot <lkp@intel.com> wrote:
> > Hi Heng,
> > 
> > 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/Heng-Qi/linux-dim-move-useful-macros-to-h-file/20240501-013413
> > base:   net-next/main
> > patch link:    https://lore.kernel.org/r/20240430173136.15807-3-hengqi%40linux.alibaba.com
> > patch subject: [PATCH net-next v11 2/4] ethtool: provide customized dim profile management
> > config: openrisc-defconfig (https://download.01.org/0day-ci/archive/20240501/202405011004.Rkw6IrSl-lkp@intel.com/config)
> > compiler: or1k-linux-gcc (GCC) 13.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240501/202405011004.Rkw6IrSl-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/202405011004.Rkw6IrSl-lkp@intel.com/
> > 
> > All warnings (new ones prefixed by >>):
> > 
> >    net/ethtool/coalesce.c: In function 'ethnl_update_profile':
> >    net/ethtool/coalesce.c:453:46: error: 'struct net_device' has no member named 'irq_moder'
> >      453 |         struct dim_irq_moder *irq_moder = dev->irq_moder;
> >          |                                              ^~
> >    net/ethtool/coalesce.c: At top level:
> > >> net/ethtool/coalesce.c:446:12: warning: 'ethnl_update_profile' defined but not used [-Wunused-function]
> >      446 | static int ethnl_update_profile(struct net_device *dev,
> >          |            ^~~~~~~~~~~~~~~~~~~~
> > >> net/ethtool/coalesce.c:151:12: warning: 'coalesce_put_profile' defined but not used [-Wunused-function]
> >      151 | static int coalesce_put_profile(struct sk_buff *skb, u16 attr_type,
> >          |            ^~~~~~~~~~~~~~~~~~~~
> > 
> 
> This is a known minor issue,
> to reduce the use of 'IS_ENABLED(CONFIG_DIMLIB)'
> mentioned in v10. Since the calls of ethnl_update_profile() and
> coalesce_put_profile() will only occur when IS_ENABLED(CONFIG_DIMLIB) returns
> true, the robot's warning can be ignored the code is safe.

I don't get it. The build seems to fail. How is this a minor issue?


> All NIPA test cases running on my local pass successfully on V11.
> 
> Alternatively, I remake the series to have IS_ENABLED(CONFIG_DIMLIB) back,
> up to Kuba (and others). :)
> 
> Thanks.
> 
> > 
> > vim +/ethnl_update_profile +446 net/ethtool/coalesce.c
> > 
> >    424	
> >    425	/**
> >    426	 * ethnl_update_profile - get a profile nest with child nests from userspace.
> >    427	 * @dev: netdevice to update the profile
> >    428	 * @dst: profile get from the driver and modified by ethnl_update_profile.
> >    429	 * @nests: nest attr ETHTOOL_A_COALESCE_*X_PROFILE to set profile.
> >    430	 * @extack: Netlink extended ack
> >    431	 *
> >    432	 * Layout of nests:
> >    433	 *   Nested ETHTOOL_A_COALESCE_*X_PROFILE attr
> >    434	 *     Nested ETHTOOL_A_PROFILE_IRQ_MODERATION attr
> >    435	 *       ETHTOOL_A_IRQ_MODERATION_USEC attr
> >    436	 *       ETHTOOL_A_IRQ_MODERATION_PKTS attr
> >    437	 *       ETHTOOL_A_IRQ_MODERATION_COMPS attr
> >    438	 *     ...
> >    439	 *     Nested ETHTOOL_A_PROFILE_IRQ_MODERATION attr
> >    440	 *       ETHTOOL_A_IRQ_MODERATION_USEC attr
> >    441	 *       ETHTOOL_A_IRQ_MODERATION_PKTS attr
> >    442	 *       ETHTOOL_A_IRQ_MODERATION_COMPS attr
> >    443	 *
> >    444	 * Return: 0 on success or a negative error code.
> >    445	 */
> >  > 446	static int ethnl_update_profile(struct net_device *dev,
> >    447					struct dim_cq_moder __rcu **dst,
> >    448					const struct nlattr *nests,
> >    449					struct netlink_ext_ack *extack)
> >    450	{
> >    451		int len_irq_moder = ARRAY_SIZE(coalesce_irq_moderation_policy);
> >    452		struct nlattr *tb[ARRAY_SIZE(coalesce_irq_moderation_policy)];
> >  > 453		struct dim_irq_moder *irq_moder = dev->irq_moder;
> >    454		struct dim_cq_moder *new_profile, *old_profile;
> >    455		int ret, rem, i = 0, len;
> >    456		struct nlattr *nest;
> >    457	
> >    458		if (!nests)
> >    459			return 0;
> >    460	
> >    461		if (!*dst)
> >    462			return -EOPNOTSUPP;
> >    463	
> >    464		old_profile = rtnl_dereference(*dst);
> >    465		len = NET_DIM_PARAMS_NUM_PROFILES * sizeof(*old_profile);
> >    466		new_profile = kmemdup(old_profile, len, GFP_KERNEL);
> >    467		if (!new_profile)
> >    468			return -ENOMEM;
> >    469	
> >    470		nla_for_each_nested_type(nest, ETHTOOL_A_PROFILE_IRQ_MODERATION,
> >    471					 nests, rem) {
> >    472			ret = nla_parse_nested(tb, len_irq_moder - 1, nest,
> >    473					       coalesce_irq_moderation_policy,
> >    474					       extack);
> >    475			if (ret)
> >    476				goto err_out;
> >    477	
> >    478			ret = ethnl_update_irq_moder(irq_moder, &new_profile[i].usec,
> >    479						     ETHTOOL_A_IRQ_MODERATION_USEC,
> >    480						     tb, DIM_COALESCE_USEC,
> >    481						     extack);
> >    482			if (ret)
> >    483				goto err_out;
> >    484	
> >    485			ret = ethnl_update_irq_moder(irq_moder, &new_profile[i].pkts,
> >    486						     ETHTOOL_A_IRQ_MODERATION_PKTS,
> >    487						     tb, DIM_COALESCE_PKTS,
> >    488						     extack);
> >    489			if (ret)
> >    490				goto err_out;
> >    491	
> >    492			ret = ethnl_update_irq_moder(irq_moder, &new_profile[i].comps,
> >    493						     ETHTOOL_A_IRQ_MODERATION_COMPS,
> >    494						     tb, DIM_COALESCE_COMPS,
> >    495						     extack);
> >    496			if (ret)
> >    497				goto err_out;
> >    498	
> >    499			i++;
> >    500		}
> >    501	
> >    502		rcu_assign_pointer(*dst, new_profile);
> >    503		kfree_rcu(old_profile, rcu);
> >    504	
> >    505		return 0;
> >    506	
> >    507	err_out:
> >    508		kfree(new_profile);
> >    509		return ret;
> >    510	}
> >    511	
> > 
> > -- 
> > 0-DAY CI Kernel Test Service
> > https://github.com/intel/lkp-tests/wiki


  reply	other threads:[~2024-05-01  5:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30 17:31 [PATCH net-next v11 0/4] ethtool: provide the dim profile fine-tuning channel Heng Qi
2024-04-30 17:31 ` [PATCH net-next v11 1/4] linux/dim: move useful macros to .h file Heng Qi
2024-04-30 17:31 ` [PATCH net-next v11 2/4] ethtool: provide customized dim profile management Heng Qi
2024-05-01  2:36   ` kernel test robot
2024-05-01  4:45     ` Heng Qi
2024-05-01  5:55       ` Michael S. Tsirkin [this message]
2024-05-01 14:44       ` Jakub Kicinski
2024-05-01 15:11         ` Heng Qi
2024-05-01 15:48           ` Michael S. Tsirkin
2024-05-01 16:19             ` Heng Qi
2024-05-01  8:06   ` kernel test robot
2024-05-01  8:27   ` kernel test robot
2024-05-03 13:52   ` Simon Horman
2024-05-04  6:32     ` Heng Qi
2024-04-30 17:31 ` [PATCH net-next v11 3/4] dim: add new interfaces for initialization and getting results Heng Qi
2024-04-30 17:31 ` [PATCH net-next v11 4/4] virtio-net: support dim profile fine-tuning Heng Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240501015303-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=ahmed.zaki@intel.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=andrew@lunn.ch \
    --cc=bcreeley@amd.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hengqi@linux.alibaba.com \
    --cc=jasowang@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=justinstitt@google.com \
    --cc=kory.maincent@bootlin.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=paul.greenwalt@intel.com \
    --cc=rkannoth@marvell.com \
    --cc=talgi@nvidia.com \
    --cc=virtualization@lists.linux.dev \
    --cc=vladimir.oltean@nxp.com \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.