All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [Intel-wired-lan] [PATCH net-next v6 1/9] igc: Fix igc_ptp_rx_pktstamp()
Date: Thu, 11 Feb 2021 13:45:17 +0800	[thread overview]
Message-ID: <202102111303.zZDnA1MJ-lkp@intel.com> (raw)
In-Reply-To: <20210210215848.24514-2-vedang.patel@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3653 bytes --]

Hi Vedang,

Thank you for the patch! Perhaps something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Vedang-Patel/igc-Add-XDP-support/20210211-061713
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git de1db4a6ed6241e34cab0e5059d4b56f6bae39b9
config: i386-randconfig-s002-20210211 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-215-g0fb77bb6-dirty
        # https://github.com/0day-ci/linux/commit/486d877688ec9b7b34adb9a2757c6ccf0b31853a
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Vedang-Patel/igc-Add-XDP-support/20210211-061713
        git checkout 486d877688ec9b7b34adb9a2757c6ccf0b31853a
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


"sparse warnings: (new ones prefixed by >>)"
>> drivers/net/ethernet/intel/igc/igc_ptp.c:181:18: sparse: sparse: cast to restricted __le32
   drivers/net/ethernet/intel/igc/igc_ptp.c:182:24: sparse: sparse: cast to restricted __le32

vim +181 drivers/net/ethernet/intel/igc/igc_ptp.c

   153	
   154	/**
   155	 * igc_ptp_rx_pktstamp - Retrieve timestamp from Rx packet buffer
   156	 * @q_vector: Pointer to interrupt specific structure
   157	 * @va: Pointer to address containing Rx buffer
   158	 * @skb: Buffer containing timestamp and packet
   159	 *
   160	 * This function retrieves the timestamp saved in the beginning of packet
   161	 * buffer. While two timestamps are available, one in timer0 reference and the
   162	 * other in timer1 reference, this function considers only the timestamp in
   163	 * timer0 reference.
   164	 */
   165	void igc_ptp_rx_pktstamp(struct igc_q_vector *q_vector, u32 *va,
   166				 struct sk_buff *skb)
   167	{
   168		struct igc_adapter *adapter = q_vector->adapter;
   169		u64 regval;
   170		int adjust;
   171	
   172		/* Timestamps are saved in little endian at the beginning of the packet
   173		 * buffer following the layout:
   174		 *
   175		 * DWORD: | 0              | 1              | 2              | 3              |
   176		 * Field: | Timer1 SYSTIML | Timer1 SYSTIMH | Timer0 SYSTIML | Timer0 SYSTIMH |
   177		 *
   178		 * SYSTIML holds the nanoseconds part while SYSTIMH holds the seconds
   179		 * part of the timestamp.
   180		 */
 > 181		regval = le32_to_cpu(va[2]);
   182		regval |= (u64)le32_to_cpu(va[3]) << 32;
   183		igc_ptp_systim_to_hwtstamp(adapter, skb_hwtstamps(skb), regval);
   184	
   185		/* Adjust timestamp for the RX latency based on link speed */
   186		switch (adapter->link_speed) {
   187		case SPEED_10:
   188			adjust = IGC_I225_RX_LATENCY_10;
   189			break;
   190		case SPEED_100:
   191			adjust = IGC_I225_RX_LATENCY_100;
   192			break;
   193		case SPEED_1000:
   194			adjust = IGC_I225_RX_LATENCY_1000;
   195			break;
   196		case SPEED_2500:
   197			adjust = IGC_I225_RX_LATENCY_2500;
   198			break;
   199		default:
   200			adjust = 0;
   201			netdev_warn_once(adapter->netdev, "Imprecise timestamp\n");
   202			break;
   203		}
   204		skb_hwtstamps(skb)->hwtstamp =
   205			ktime_sub_ns(skb_hwtstamps(skb)->hwtstamp, adjust);
   206	}
   207	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 52829 bytes --]

  parent reply	other threads:[~2021-02-11  5:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 21:58 [Intel-wired-lan] [PATCH net-next v6 0/9] igc: Add XDP support Vedang Patel
2021-02-10 21:58 ` [Intel-wired-lan] [PATCH net-next v6 1/9] igc: Fix igc_ptp_rx_pktstamp() Vedang Patel
2021-02-11  0:30   ` Nguyen, Anthony L
2021-02-12 19:16     ` Joseph, Jithu
2021-02-11  5:45   ` kernel test robot [this message]
2021-03-02  8:20   ` Dvora Fuxbrumer
2021-02-10 21:58 ` [Intel-wired-lan] [PATCH net-next v6 2/9] igc: Remove unused argument from igc_tx_cmd_type() Vedang Patel
2021-03-02  8:20   ` Dvora Fuxbrumer
2021-02-10 21:58 ` [Intel-wired-lan] [PATCH net-next v6 3/9] igc: Introduce igc_rx_buffer_flip() helper Vedang Patel
2021-03-02  8:20   ` Dvora Fuxbrumer
2021-02-10 21:58 ` [Intel-wired-lan] [PATCH net-next v6 4/9] igc: Introduce igc_get_rx_frame_truesize() helper Vedang Patel
2021-03-02  8:21   ` Dvora Fuxbrumer
2021-02-10 21:58 ` [Intel-wired-lan] [PATCH net-next v6 5/9] igc: Refactor Rx timestamp handling Vedang Patel
2021-03-02  8:21   ` Dvora Fuxbrumer
2021-02-10 21:58 ` [Intel-wired-lan] [PATCH net-next v6 6/9] igc: Add set/clear large buffer helpers Vedang Patel
2021-03-02  8:21   ` Dvora Fuxbrumer
2021-02-10 21:58 ` [Intel-wired-lan] [PATCH net-next v6 7/9] igc: Add initial XDP support Vedang Patel
2021-03-02  8:22   ` Dvora Fuxbrumer
2021-02-10 21:58 ` [Intel-wired-lan] [PATCH net-next v6 8/9] igc: Add support for XDP_TX action Vedang Patel
2021-03-02  8:22   ` Dvora Fuxbrumer
2021-02-10 21:58 ` [Intel-wired-lan] [PATCH net-next v6 9/9] igc: Add support for XDP_REDIRECT action Vedang Patel
2021-03-02  8:22   ` Dvora Fuxbrumer
2021-03-02  8:19 ` [Intel-wired-lan] [PATCH net-next v6 0/9] igc: Add XDP support Dvora Fuxbrumer

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=202102111303.zZDnA1MJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.