lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211290847.wW6xCbMT-lkp@intel.com>
Date:   Tue, 29 Nov 2022 08:43:35 +0800
From:   kernel test robot <lkp@...el.com>
To:     Arun Ramadoss <arun.ramadoss@...rochip.com>,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev, woojung.huh@...rochip.com,
        UNGLinuxDriver@...rochip.com, andrew@...n.ch,
        vivien.didelot@...il.com, f.fainelli@...il.com, olteanv@...il.com,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, linux@...linux.org.uk,
        Tristram.Ha@...rochip.com, richardcochran@...il.com,
        ceggers@...i.de
Subject: Re: [Patch net-next v1 07/12] net: dsa: microchip: ptp: add packet
 reception timestamping

Hi Arun,

I love your patch! Yet something to improve:

[auto build test ERROR on a6e3d86ece0b42a571a11055ace5c3148cb7ce76]

url:    https://github.com/intel-lab-lkp/linux/commits/Arun-Ramadoss/net-dsa-microchip-add-PTP-support-for-KSZ9563-KSZ8563-and-LAN937x/20221128-183731
base:   a6e3d86ece0b42a571a11055ace5c3148cb7ce76
patch link:    https://lore.kernel.org/r/20221128103227.23171-8-arun.ramadoss%40microchip.com
patch subject: [Patch net-next v1 07/12] net: dsa: microchip: ptp: add packet reception timestamping
config: arm-randconfig-r046-20221128
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/104ec46b17d7bf278a05fca30b1cd513c4f7adac
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Arun-Ramadoss/net-dsa-microchip-add-PTP-support-for-KSZ9563-KSZ8563-and-LAN937x/20221128-183731
        git checkout 104ec46b17d7bf278a05fca30b1cd513c4f7adac
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash net/dsa/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   net/dsa/tag_ksz.c: In function 'ksz_rcv_timestamp':
>> net/dsa/tag_ksz.c:225:9: error: implicit declaration of function 'ptp_header_update_correction' [-Werror=implicit-function-declaration]
     225 |         ptp_header_update_correction(skb, ptp_type, ptp_hdr, correction);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/ptp_header_update_correction +225 net/dsa/tag_ksz.c

   176	
   177	static void ksz_rcv_timestamp(struct sk_buff *skb, u8 *tag,
   178				      struct net_device *dev, unsigned int port)
   179	{
   180		struct skb_shared_hwtstamps *hwtstamps = skb_hwtstamps(skb);
   181		struct dsa_switch *ds = dev->dsa_ptr->ds;
   182		u8 *tstamp_raw = tag - KSZ_PTP_TAG_LEN;
   183		struct ksz_tagger_data *tagger_data;
   184		struct ptp_header *ptp_hdr;
   185		unsigned int ptp_type;
   186		u8 ptp_msg_type;
   187		ktime_t tstamp;
   188		s64 correction;
   189	
   190		tagger_data = ksz_tagger_data(ds);
   191		if (!tagger_data->meta_tstamp_handler)
   192			return;
   193	
   194		/* convert time stamp and write to skb */
   195		tstamp = ksz_decode_tstamp(get_unaligned_be32(tstamp_raw));
   196		memset(hwtstamps, 0, sizeof(*hwtstamps));
   197		hwtstamps->hwtstamp = tagger_data->meta_tstamp_handler(ds, tstamp);
   198	
   199		if (skb_headroom(skb) < ETH_HLEN)
   200			return;
   201	
   202		__skb_push(skb, ETH_HLEN);
   203		ptp_type = ptp_classify_raw(skb);
   204		__skb_pull(skb, ETH_HLEN);
   205	
   206		if (ptp_type == PTP_CLASS_NONE)
   207			return;
   208	
   209		ptp_hdr = ptp_parse_header(skb, ptp_type);
   210		if (!ptp_hdr)
   211			return;
   212	
   213		ptp_msg_type = ptp_get_msgtype(ptp_hdr, ptp_type);
   214		if (ptp_msg_type != PTP_MSGTYPE_PDELAY_REQ)
   215			return;
   216	
   217		/* Only subtract the partial time stamp from the correction field.  When
   218		 * the hardware adds the egress time stamp to the correction field of
   219		 * the PDelay_Resp message on tx, also only the partial time stamp will
   220		 * be added.
   221		 */
   222		correction = (s64)get_unaligned_be64(&ptp_hdr->correction);
   223		correction -= ktime_to_ns(tstamp) << 16;
   224	
 > 225		ptp_header_update_correction(skb, ptp_type, ptp_hdr, correction);
   226	}
   227	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (173886 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ