All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Birger Koblitz <mail@birger-koblitz.de>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Russell King <linux@armlinux.org.uk>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	netdev@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Birger Koblitz <mail@birger-koblitz.de>
Subject: Re: [PATCH net-next 3/3] net: usb: ax88179: Enable PTP
Date: Mon, 30 Nov 2026 05:18:23 +0800	[thread overview]
Message-ID: <20261130050726.LLJ9oe3l-lkp@intel.com> (raw)
In-Reply-To: <20261129-ptp-v1-3-8148c402beaf@birger-koblitz.de>

Hi Birger,

kernel test robot noticed the following build warnings:

[auto build test WARNING on eb6d6c80d35449c27471b1874f13066c09a8964d]

url:    https://github.com/intel-lab-lkp/linux/commits/Birger-Koblitz/net-usb-ax88179-Add-PTP-data-structures-and-definitions/20261129-102950
base:   eb6d6c80d35449c27471b1874f13066c09a8964d
patch link:    https://lore.kernel.org/r/20261129-ptp-v1-3-8148c402beaf%40birger-koblitz.de
patch subject: [PATCH net-next 3/3] net: usb: ax88179: Enable PTP
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20261130/20261130050726.LLJ9oe3l-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 04597ff5c4eda9d66da39a536aa26a7bab2fb2dd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261130/20261130050726.LLJ9oe3l-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/20261130050726.LLJ9oe3l-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/net/usb/ax88179a_devices.c:1182:18: warning: shift count >= width of type [-Wshift-count-overflow]
    1182 |                 if (pkt_desc & AX179A_RX_PD_PTP) {
         |                                ^~~~~~~~~~~~~~~~
   drivers/net/usb/ax88179_lib.h:272:27: note: expanded from macro 'AX179A_RX_PD_PTP'
     272 | #define AX179A_RX_PD_PTP                BIT(56)
         |                                         ^~~~~~~
   include/vdso/bits.h:7:26: note: expanded from macro 'BIT'
       7 | #define BIT(nr)                 (UL(1) << (nr))
         |                                        ^  ~~~~
   1 warning generated.


vim +1182 drivers/net/usb/ax88179a_devices.c

  1078	
  1079	static int ax88179a_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
  1080	{
  1081		struct ax88179_data *ax179_data = dev->driver_priv;
  1082		struct sk_buff *ax_skb;
  1083		u32 hdr_off, pkt_end;
  1084		__le64 *pkt_desc_ptr;
  1085		u16 vlan_tag;
  1086		u16 pkt_cnt;
  1087		u64 rx_hdr;
  1088	
  1089		/* SKB contents for AX179A-based chips:
  1090		 *   <packet 1>
  1091		 *   ...
  1092		 *   <packet N>
  1093		 *   <per-packet metadata entry 1>
  1094		 *   ...
  1095		 *   <per-packet metadata entry N>
  1096		 *   <rx_hdr>
  1097		 *
  1098		 * where:
  1099		 *   <packet N> contains pkt_len data bytes and padding:
  1100		 *		2 bytes of IP alignment (optional, depends on AX_RX_CTL_IPE flag)
  1101		 *		packet data received
  1102		 *		optional padding to 8-bytes boundary
  1103		 *   <per-packet metadata entry N> contains 8 bytes:
  1104		 *		pkt_len and fields AX_RXHDR_*
  1105		 *   <rx-hdr>	contains 8 bytes:
  1106		 *		pkt_cnt and hdr_off (offset of <per-packet metadata entry 1>)
  1107		 *
  1108		 * pkt_cnt is number of entries in the per-packet metadata array.
  1109		 */
  1110	
  1111		if (!skb || skb->len < sizeof(rx_hdr))
  1112			goto err;
  1113	
  1114		/* RX Descriptor Header */
  1115		skb_trim(skb, skb->len - sizeof(rx_hdr));
  1116		rx_hdr = get_unaligned_le64((__le64 *)skb_tail_pointer(skb));
  1117	
  1118		/* Check these packets */
  1119		hdr_off = FIELD_GET(AX179A_RX_DH_DESC_OFFSET, rx_hdr);
  1120		pkt_cnt = rx_hdr & AX179A_RX_DH_PKT_CNT_MASK;
  1121	
  1122		/* Consistency check header position, frames with PTP timestamps
  1123		 * have longer headers than normal frames, so check for minimum size
  1124		 */
  1125		if (hdr_off > skb->len - (pkt_cnt * sizeof(rx_hdr)))
  1126			goto err;
  1127	
  1128		/* Make sure that the bounds of the metadata array are inside the SKB
  1129		 * (and in front of the counter at the end).
  1130		 */
  1131		if (pkt_cnt * 8 + hdr_off > skb->len)
  1132			goto err;
  1133	
  1134		/* Packets must not overlap the metadata array */
  1135		skb_trim(skb, hdr_off);
  1136	
  1137		if (!pkt_cnt)
  1138			goto err;
  1139	
  1140		/* Get the first RX packet descriptor */
  1141		pkt_desc_ptr = (__le64 *)(skb->data + hdr_off);
  1142	
  1143		pkt_end = 0;
  1144		while (pkt_cnt--) {
  1145			u64 pkt_desc = get_unaligned_le64(pkt_desc_ptr);
  1146			u32 pkt_len_plus_padd;
  1147			u32 pkt_len;
  1148	
  1149			pkt_len = FIELD_GET(AX179A_RX_PD_LEN, pkt_desc);
  1150			pkt_len -= (ax179_data->ip_align ? 2 : 0);
  1151			pkt_len_plus_padd = ((pkt_len + 7 + (ax179_data->ip_align ? 2 : 0)) & 0x7FFF8);
  1152	
  1153			pkt_end += pkt_len_plus_padd;
  1154			if (pkt_end > hdr_off || (pkt_cnt == 0 && pkt_end != hdr_off))
  1155				goto err;
  1156	
  1157			if (pkt_desc & AX179A_RX_PD_DROP || !(pkt_desc & AX179A_RX_PD_RX_OK) ||
  1158			    pkt_len > (dev->hard_mtu + AX179A_RX_HW_PAD) || pkt_len < 2 + ETH_HLEN) {
  1159				skb_pull(skb, pkt_len_plus_padd);
  1160	
  1161				/* Next RX Packet Descriptor */
  1162				pkt_desc_ptr++;
  1163				continue;
  1164			}
  1165	
  1166			ax_skb = netdev_alloc_skb_ip_align(dev->net, pkt_len);
  1167			if (!ax_skb)
  1168				goto err;
  1169	
  1170			skb_put(ax_skb, pkt_len);
  1171			memcpy(ax_skb->data, skb->data + (ax179_data->ip_align ? AX179A_RX_HW_PAD : 0),
  1172			       pkt_len);
  1173	
  1174			if (ax179_data->rx_checksum)
  1175				ax88179a_rx_checksum(ax_skb, pkt_desc);
  1176	
  1177			if (pkt_desc & AX179A_RX_PD_VLAN) {
  1178				vlan_tag = pkt_desc >> AX179A_RX_PD_VLAN_SHIFT;
  1179				__vlan_hwaccel_put_tag(ax_skb, htons(ETH_P_8021Q), vlan_tag);
  1180			}
  1181	
> 1182			if (pkt_desc & AX179A_RX_PD_PTP) {
  1183				u64 ts_l = get_unaligned_le64(++pkt_desc_ptr);
  1184				u64 ts_h = get_unaligned_le64(++pkt_desc_ptr);
  1185	
  1186				ax88179a_process_rx_ts(ax_skb, ts_l, ts_h);
  1187			}
  1188	
  1189			usbnet_skb_return(dev, ax_skb);
  1190			skb_pull(skb, pkt_len_plus_padd);
  1191	
  1192			/* Next RX Packet Header */
  1193			pkt_desc_ptr++;
  1194		}
  1195	
  1196		return 1;
  1197	
  1198	err:
  1199		return 0;
  1200	}
  1201	

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

  parent reply	other threads:[~2026-11-29 21:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29  9:29 [PATCH net-next 0/3] net: usb: ax88179: Add support for PTP Birger Koblitz
2026-11-29  9:29 ` [PATCH net-next 1/3] net: usb: ax88179: Add PTP data structures and definitions Birger Koblitz
2026-11-30  9:30   ` sashiko-bot
2026-11-29  9:29 ` [PATCH net-next 2/3] net: usb: ax88179: Add PTP Implementation Birger Koblitz
2026-11-29 18:31   ` Manuel Ebner
2026-11-30  5:18     ` Birger Koblitz
2026-11-30  9:30   ` sashiko-bot
2026-11-29  9:29 ` [PATCH net-next 3/3] net: usb: ax88179: Enable PTP Birger Koblitz
2026-11-29 15:48   ` Andrew Lunn
2026-11-29 17:24     ` Birger Koblitz
2026-11-29 21:09       ` Andrew Lunn
2026-11-29 21:18   ` kernel test robot [this message]
2026-11-30  9:30   ` sashiko-bot

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=20261130050726.LLJ9oe3l-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=llvm@lists.linux.dev \
    --cc=mail@birger-koblitz.de \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.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.