[dborkman-bpf:pr/bpf-tstamp 3/3] net/sched/sch_taprio.c:322:37: error: 'struct sk_buff' has no member named 'skb_mstamp_ns'

From: kernel test robot
Date: Fri Sep 17 2021 - 00:56:29 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-tstamp
head: f7d619a946e981177777983af26e9e31163ffb38
commit: f7d619a946e981177777983af26e9e31163ffb38 [3/3] net: skb clock bases
config: parisc-buildonly-randconfig-r001-20210916 (attached as .config)
compiler: hppa-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git/commit/?id=f7d619a946e981177777983af26e9e31163ffb38
git remote add dborkman-bpf https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git
git fetch --no-tags dborkman-bpf pr/bpf-tstamp
git checkout f7d619a946e981177777983af26e9e31163ffb38
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash net/sched/

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

All errors (new ones prefixed by >>):

In file included from net/sched/sch_taprio.c:26:
include/net/tcp.h: In function 'tcp_skb_timestamp':
include/net/tcp.h:812:32: error: 'const struct sk_buff' has no member named 'skb_mstamp_ns'
812 | return tcp_ns_to_ts(skb->skb_mstamp_ns);
| ^~
include/net/tcp.h: In function 'tcp_skb_timestamp_us':
include/net/tcp.h:818:27: error: 'const struct sk_buff' has no member named 'skb_mstamp_ns'
818 | return div_u64(skb->skb_mstamp_ns, NSEC_PER_USEC);
| ^~
include/net/tcp.h: In function 'tcp_add_tx_delay':
include/net/tcp.h:2367:20: error: 'struct sk_buff' has no member named 'skb_mstamp_ns'
2367 | skb->skb_mstamp_ns += (u64)tp->tcp_tx_delay * NSEC_PER_USEC;
| ^~
net/sched/sch_taprio.c: In function 'get_tcp_tstamp':
>> net/sched/sch_taprio.c:322:37: error: 'struct sk_buff' has no member named 'skb_mstamp_ns'
322 | return ktime_mono_to_any(skb->skb_mstamp_ns, q->tk_offset);
| ^~
net/sched/sch_taprio.c:323:1: error: control reaches end of non-void function [-Werror=return-type]
323 | }
| ^
cc1: some warnings being treated as errors


vim +322 net/sched/sch_taprio.c

9c66d15646760e Vinicius Costa Gomes 2019-09-15 289
54002066100b6d Vedang Patel 2019-06-25 290 /* This returns the tstamp value set by TCP in terms of the set clock. */
54002066100b6d Vedang Patel 2019-06-25 291 static ktime_t get_tcp_tstamp(struct taprio_sched *q, struct sk_buff *skb)
54002066100b6d Vedang Patel 2019-06-25 292 {
54002066100b6d Vedang Patel 2019-06-25 293 unsigned int offset = skb_network_offset(skb);
54002066100b6d Vedang Patel 2019-06-25 294 const struct ipv6hdr *ipv6h;
54002066100b6d Vedang Patel 2019-06-25 295 const struct iphdr *iph;
54002066100b6d Vedang Patel 2019-06-25 296 struct ipv6hdr _ipv6h;
54002066100b6d Vedang Patel 2019-06-25 297
54002066100b6d Vedang Patel 2019-06-25 298 ipv6h = skb_header_pointer(skb, offset, sizeof(_ipv6h), &_ipv6h);
54002066100b6d Vedang Patel 2019-06-25 299 if (!ipv6h)
54002066100b6d Vedang Patel 2019-06-25 300 return 0;
54002066100b6d Vedang Patel 2019-06-25 301
54002066100b6d Vedang Patel 2019-06-25 302 if (ipv6h->version == 4) {
54002066100b6d Vedang Patel 2019-06-25 303 iph = (struct iphdr *)ipv6h;
54002066100b6d Vedang Patel 2019-06-25 304 offset += iph->ihl * 4;
54002066100b6d Vedang Patel 2019-06-25 305
54002066100b6d Vedang Patel 2019-06-25 306 /* special-case 6in4 tunnelling, as that is a common way to get
54002066100b6d Vedang Patel 2019-06-25 307 * v6 connectivity in the home
54002066100b6d Vedang Patel 2019-06-25 308 */
54002066100b6d Vedang Patel 2019-06-25 309 if (iph->protocol == IPPROTO_IPV6) {
54002066100b6d Vedang Patel 2019-06-25 310 ipv6h = skb_header_pointer(skb, offset,
54002066100b6d Vedang Patel 2019-06-25 311 sizeof(_ipv6h), &_ipv6h);
54002066100b6d Vedang Patel 2019-06-25 312
54002066100b6d Vedang Patel 2019-06-25 313 if (!ipv6h || ipv6h->nexthdr != IPPROTO_TCP)
54002066100b6d Vedang Patel 2019-06-25 314 return 0;
54002066100b6d Vedang Patel 2019-06-25 315 } else if (iph->protocol != IPPROTO_TCP) {
54002066100b6d Vedang Patel 2019-06-25 316 return 0;
54002066100b6d Vedang Patel 2019-06-25 317 }
54002066100b6d Vedang Patel 2019-06-25 318 } else if (ipv6h->version == 6 && ipv6h->nexthdr != IPPROTO_TCP) {
54002066100b6d Vedang Patel 2019-06-25 319 return 0;
54002066100b6d Vedang Patel 2019-06-25 320 }
54002066100b6d Vedang Patel 2019-06-25 321
54002066100b6d Vedang Patel 2019-06-25 @322 return ktime_mono_to_any(skb->skb_mstamp_ns, q->tk_offset);
54002066100b6d Vedang Patel 2019-06-25 323 }
54002066100b6d Vedang Patel 2019-06-25 324

:::::: The code at line 322 was first introduced by commit
:::::: 54002066100b6d2f731157156c41d853e0c9137e taprio: Adjust timestamps for TCP packets

:::::: TO: Vedang Patel <vedang.patel@xxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip