All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Willem de Bruijn <willemb@google.com>
Cc: oe-kbuild-all@lists.linux.dev, 0day robot <lkp@intel.com>
Subject: drivers/net/ethernet/intel/idpf/idpf_txrx.c:3025:34: warning: unused variable 'np'
Date: Mon, 07 Sep 2026 21:19:20 +0200	[thread overview]
Message-ID: <202609072109.CNby2SVX-lkp@intel.com> (raw)

tree:   https://github.com/intel-lab-lkp/linux/commits/Willem-de-Bruijn/net-rtnetlink-add-pacing_offload_horizon-attribute-to-net_device/20260831-172610
head:   69b32b4e203508fb1bcee3f427fab52eac49ff03
commit: 823b97f23d9e611040fcf018d85ce318ed1a549c idpf: support pacing offload
date:   7 days ago
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260907/202609072109.CNby2SVX-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260907/202609072109.CNby2SVX-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/202609072109.CNby2SVX-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/intel/idpf/idpf_txrx.c: In function 'idpf_tx_splitq_set_txtime':
>> drivers/net/ethernet/intel/idpf/idpf_txrx.c:3025:34: warning: unused variable 'np' [-Wunused-variable]
    3025 |         struct idpf_netdev_priv *np = netdev_priv(skb->dev);
         |                                  ^~


vim +/np +3025 drivers/net/ethernet/intel/idpf/idpf_txrx.c

  3019	
  3020	static void idpf_tx_splitq_set_txtime(const struct sk_buff *skb,
  3021					      const struct idpf_tx_queue *tx_q,
  3022					      struct idpf_tx_splitq_params *tx_params)
  3023	{
  3024		const int offload_slack_ns = 400;
> 3025		struct idpf_netdev_priv *np = netdev_priv(skb->dev);
  3026		u64 ts, now, horizon;
  3027	
  3028		horizon = READ_ONCE(skb->dev->pacing_offload_horizon);
  3029		if (!horizon)
  3030			return;
  3031	
  3032		switch (skb->tstamp_type) {
  3033		case SKB_CLOCK_REALTIME:
  3034			ts = ktime_to_ns(ktime_add(skb->tstamp,
  3035						   ktime_mono_to_any(0, TK_OFFS_TAI) -
  3036						   ktime_mono_to_any(0, TK_OFFS_REAL)));
  3037			break;
  3038		case SKB_CLOCK_MONOTONIC:
  3039			ts = ktime_to_ns(ktime_mono_to_any(skb->tstamp, TK_OFFS_TAI));
  3040			break;
  3041		case SKB_CLOCK_TAI:
  3042			ts = ktime_to_ns(skb->tstamp);
  3043			break;
  3044		default:
  3045			WARN_ON_ONCE(1);
  3046			return;
  3047		}
  3048	
  3049		now = ktime_get_clocktai_ns();
  3050		if (ts < now + offload_slack_ns)
  3051			return;
  3052	
  3053		/* beyond offload horizon? set overflow bit only */
  3054		if (ts > now + horizon) {
  3055			tx_params->offload.desc_ts[2] =
  3056				IDPF_TXD_FLOW_SCH_HORIZON_OVERFLOW_M;
  3057			return;
  3058		}
  3059	
  3060		ts >>= tx_q->ts_gran_pow2;
  3061	
  3062		/* 0 is valid 23b timestamp, but also means field unset.
  3063		 * Increase by one to avoid this case
  3064		 */
  3065		if ((ts & 0x7fffff) == 0) {
  3066			tx_params->offload.desc_ts[0] = 1;
  3067			return;
  3068		}
  3069	
  3070		tx_params->offload.desc_ts[0] = ts & 0xff;
  3071		tx_params->offload.desc_ts[1] = (ts >> 8) & 0xff;
  3072		tx_params->offload.desc_ts[2] = ((ts >> 16) & 0x7f);
  3073	}
  3074	

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

                 reply	other threads:[~2026-09-07 19:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202609072109.CNby2SVX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=willemb@google.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.