From: kernel test robot <lkp@intel.com>
To: Heng Qi <hengqi@linux.alibaba.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>
Subject: Re: [PATCH net-next 2/4] virtio-net: reprobe csum related fields for skb passed by XDP
Date: Mon, 19 Jun 2023 21:32:46 +0800 [thread overview]
Message-ID: <202306192151.YMz3NiKw-lkp@intel.com> (raw)
In-Reply-To: <20230619105738.117733-3-hengqi@linux.alibaba.com>
Hi Heng,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Heng-Qi/virtio-net-a-helper-for-probing-the-pseudo-header-checksum/20230619-190212
base: net-next/main
patch link: https://lore.kernel.org/r/20230619105738.117733-3-hengqi%40linux.alibaba.com
patch subject: [PATCH net-next 2/4] virtio-net: reprobe csum related fields for skb passed by XDP
config: x86_64-randconfig-r014-20230619 (https://download.01.org/0day-ci/archive/20230619/202306192151.YMz3NiKw-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20230619/202306192151.YMz3NiKw-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/202306192151.YMz3NiKw-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/virtio_net.c:1648:17: error: call to undeclared function 'csum_ipv6_magic'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
uh->check = ~csum_ipv6_magic((const struct in6_addr *)&ip6h->saddr,
^
drivers/net/virtio_net.c:1648:17: note: did you mean 'csum_tcpudp_magic'?
include/asm-generic/checksum.h:52:1: note: 'csum_tcpudp_magic' declared here
csum_tcpudp_magic(__be32 saddr, __be32 daddr, __u32 len,
^
drivers/net/virtio_net.c:1657:17: error: call to undeclared function 'csum_ipv6_magic'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
th->check = ~csum_ipv6_magic((const struct in6_addr *)&ip6h->saddr,
^
>> drivers/net/virtio_net.c:1695:19: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
} else if (flags && VIRTIO_NET_HDR_F_DATA_VALID) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/virtio_net.c:1695:19: note: use '&' for a bitwise operation
} else if (flags && VIRTIO_NET_HDR_F_DATA_VALID) {
^~
&
drivers/net/virtio_net.c:1695:19: note: remove constant to silence this warning
} else if (flags && VIRTIO_NET_HDR_F_DATA_VALID) {
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.
vim +1695 drivers/net/virtio_net.c
1667
1668 static int virtnet_set_csum_after_xdp(struct virtnet_info *vi,
1669 struct sk_buff *skb,
1670 __u8 flags)
1671 {
1672 int err;
1673
1674 /* When XDP program is loaded, for example, the vm-vm scenario
1675 * on the same host, packets marked as VIRTIO_NET_HDR_F_NEEDS_CSUM
1676 * will travel. Although these packets are safe from the point of
1677 * view of the vm, to avoid modification by XDP and successful
1678 * forwarding in the upper layer, we re-probe the necessary checksum
1679 * related information: skb->csum_{start, offset}, pseudo-header csum.
1680 *
1681 * This benefits us:
1682 * 1. XDP can be loaded when there's _F_GUEST_CSUM.
1683 * 2. The device verifies the checksum of packets , especially
1684 * benefiting for large packets.
1685 * 3. In the same-host vm-vm scenario, packets marked as
1686 * VIRTIO_NET_HDR_F_NEEDS_CSUM are no longer dropped after being
1687 * processed by XDP.
1688 */
1689 if (flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
1690 err = virtnet_flow_dissect_udp_tcp(vi, skb);
1691 if (err < 0)
1692 return -EINVAL;
1693
1694 skb->ip_summed = CHECKSUM_PARTIAL;
> 1695 } else if (flags && VIRTIO_NET_HDR_F_DATA_VALID) {
1696 /* We want to benefit from this: XDP guarantees that packets marked
1697 * as VIRTIO_NET_HDR_F_DATA_VALID still have correct csum after they
1698 * are processed.
1699 */
1700 skb->ip_summed = CHECKSUM_UNNECESSARY;
1701 }
1702
1703 return 0;
1704 }
1705
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-06-19 13:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-19 10:57 [PATCH net-next 0/4] virtio-net: avoid XDP and _F_GUEST_CSUM Heng Qi
2023-06-19 10:57 ` [PATCH net-next 1/4] virtio-net: a helper for probing the pseudo-header checksum Heng Qi
2023-06-19 12:30 ` kernel test robot
2023-06-19 12:30 ` kernel test robot
2023-06-19 10:57 ` [PATCH net-next 2/4] virtio-net: reprobe csum related fields for skb passed by XDP Heng Qi
2023-06-19 11:27 ` Michael S. Tsirkin
2023-06-19 12:29 ` Heng Qi
2023-06-19 13:32 ` kernel test robot [this message]
2023-06-19 10:57 ` [PATCH net-next 3/4] virtio-net: support coexistence of XDP and _F_GUEST_CSUM Heng Qi
2023-06-19 11:26 ` Michael S. Tsirkin
2023-06-19 12:31 ` Heng Qi
2023-06-20 3:24 ` Heng Qi
2023-06-20 10:50 ` Michael S. Tsirkin
2023-06-20 11:01 ` Heng Qi
2023-06-20 12:10 ` Michael S. Tsirkin
2023-06-20 14:15 ` Heng Qi
2023-06-19 10:57 ` [PATCH net-next 4/4] virtio-net: remove F_GUEST_CSUM check for XDP loading Heng Qi
2023-06-19 11:16 ` Michael S. Tsirkin
2023-06-19 12:41 ` Heng Qi
2023-06-19 14:33 ` Michael S. Tsirkin
2023-06-19 15:43 ` Heng Qi
2023-06-19 18:36 ` Michael S. Tsirkin
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=202306192151.YMz3NiKw-lkp@intel.com \
--to=lkp@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=hengqi@linux.alibaba.com \
--cc=jasowang@redhat.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=xuanzhuo@linux.alibaba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).