* drivers/net/ethernet/intel/idpf/idpf_txrx.c:3025:34: warning: unused variable 'np'
@ 2026-09-07 19:19 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-07 19:19 UTC (permalink / raw)
To: Willem de Bruijn; +Cc: oe-kbuild-all, 0day robot
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-07 19:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 19:19 drivers/net/ethernet/intel/idpf/idpf_txrx.c:3025:34: warning: unused variable 'np' kernel test robot
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.