From: kbuild test robot <lkp@intel.com>
To: anton.ivanov@cambridgegreys.com
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org,
virtualization@lists.linux-foundation.org,
linux-um@lists.infradead.org, mst@redhat.com,
jasowang@redhat.com, eric.dumazet@gmail.com,
Anton Ivanov <anton.ivanov@cambridgegreys.com>
Subject: Re: [PATCH v2] virtio: Work around frames incorrectly marked as gso
Date: Mon, 24 Feb 2020 20:37:13 +0800 [thread overview]
Message-ID: <202002242010.iS7IWW8N%lkp@intel.com> (raw)
In-Reply-To: <20200224101912.14074-1-anton.ivanov@cambridgegreys.com>
[-- Attachment #1: Type: text/plain, Size: 5230 bytes --]
Hi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on vhost/linux-next]
[also build test WARNING on linus/master ipvs/master v5.6-rc3 next-20200224]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/anton-ivanov-cambridgegreys-com/virtio-Work-around-frames-incorrectly-marked-as-gso/20200224-190342
base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: nds32-defconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from net/packet/af_packet.c:82:
include/linux/virtio_net.h: In function 'virtio_net_hdr_from_skb':
>> include/linux/virtio_net.h:103:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
103 | struct skb_shared_info *sinfo = skb_shinfo(skb);
| ^~~~~~
vim +103 include/linux/virtio_net.h
fd2a0437dc33b6 Mike Rapoport 2016-06-08 94
fd2a0437dc33b6 Mike Rapoport 2016-06-08 95 static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb,
fd2a0437dc33b6 Mike Rapoport 2016-06-08 96 struct virtio_net_hdr *hdr,
6391a4481ba079 Jason Wang 2017-01-20 97 bool little_endian,
fd3a8862584490 Willem de Bruijn 2018-06-06 98 bool has_data_valid,
fd3a8862584490 Willem de Bruijn 2018-06-06 99 int vlan_hlen)
fd2a0437dc33b6 Mike Rapoport 2016-06-08 100 {
9403cd7cbb08aa Jarno Rajahalme 2016-11-18 101 memset(hdr, 0, sizeof(*hdr)); /* no info leak */
fd2a0437dc33b6 Mike Rapoport 2016-06-08 102
fd2a0437dc33b6 Mike Rapoport 2016-06-08 @103 struct skb_shared_info *sinfo = skb_shinfo(skb);
3d2c1fd2739938 Anton Ivanov 2020-02-24 104 if (skb_is_gso(skb) && sinfo->gso_type) {
fd2a0437dc33b6 Mike Rapoport 2016-06-08 105
fd2a0437dc33b6 Mike Rapoport 2016-06-08 106 /* This is a hint as to how much should be linear. */
fd2a0437dc33b6 Mike Rapoport 2016-06-08 107 hdr->hdr_len = __cpu_to_virtio16(little_endian,
fd2a0437dc33b6 Mike Rapoport 2016-06-08 108 skb_headlen(skb));
fd2a0437dc33b6 Mike Rapoport 2016-06-08 109 hdr->gso_size = __cpu_to_virtio16(little_endian,
fd2a0437dc33b6 Mike Rapoport 2016-06-08 110 sinfo->gso_size);
fd2a0437dc33b6 Mike Rapoport 2016-06-08 111 if (sinfo->gso_type & SKB_GSO_TCPV4)
fd2a0437dc33b6 Mike Rapoport 2016-06-08 112 hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV4;
fd2a0437dc33b6 Mike Rapoport 2016-06-08 113 else if (sinfo->gso_type & SKB_GSO_TCPV6)
fd2a0437dc33b6 Mike Rapoport 2016-06-08 114 hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV6;
fd2a0437dc33b6 Mike Rapoport 2016-06-08 115 else
fd2a0437dc33b6 Mike Rapoport 2016-06-08 116 return -EINVAL;
fd2a0437dc33b6 Mike Rapoport 2016-06-08 117 if (sinfo->gso_type & SKB_GSO_TCP_ECN)
fd2a0437dc33b6 Mike Rapoport 2016-06-08 118 hdr->gso_type |= VIRTIO_NET_HDR_GSO_ECN;
fd2a0437dc33b6 Mike Rapoport 2016-06-08 119 } else
fd2a0437dc33b6 Mike Rapoport 2016-06-08 120 hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE;
fd2a0437dc33b6 Mike Rapoport 2016-06-08 121
fd2a0437dc33b6 Mike Rapoport 2016-06-08 122 if (skb->ip_summed == CHECKSUM_PARTIAL) {
fd2a0437dc33b6 Mike Rapoport 2016-06-08 123 hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
fd2a0437dc33b6 Mike Rapoport 2016-06-08 124 hdr->csum_start = __cpu_to_virtio16(little_endian,
fd3a8862584490 Willem de Bruijn 2018-06-06 125 skb_checksum_start_offset(skb) + vlan_hlen);
fd2a0437dc33b6 Mike Rapoport 2016-06-08 126 hdr->csum_offset = __cpu_to_virtio16(little_endian,
fd2a0437dc33b6 Mike Rapoport 2016-06-08 127 skb->csum_offset);
6391a4481ba079 Jason Wang 2017-01-20 128 } else if (has_data_valid &&
6391a4481ba079 Jason Wang 2017-01-20 129 skb->ip_summed == CHECKSUM_UNNECESSARY) {
6391a4481ba079 Jason Wang 2017-01-20 130 hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID;
fd2a0437dc33b6 Mike Rapoport 2016-06-08 131 } /* else everything is zero */
fd2a0437dc33b6 Mike Rapoport 2016-06-08 132
fd2a0437dc33b6 Mike Rapoport 2016-06-08 133 return 0;
fd2a0437dc33b6 Mike Rapoport 2016-06-08 134 }
fd2a0437dc33b6 Mike Rapoport 2016-06-08 135
:::::: The code at line 103 was first introduced by commit
:::::: fd2a0437dc33b6425cabf74cc7fc7fdba6d5903b virtio_net: introduce virtio_net_hdr_{from,to}_skb
:::::: TO: Mike Rapoport <rppt@linux.vnet.ibm.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 10726 bytes --]
next prev parent reply other threads:[~2020-02-24 12:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-24 10:19 [PATCH v2] virtio: Work around frames incorrectly marked as gso anton.ivanov
2020-02-24 12:37 ` kbuild test robot [this message]
2020-02-24 12:46 ` Michael S. Tsirkin
2020-02-24 12:51 ` Anton Ivanov
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=202002242010.iS7IWW8N%lkp@intel.com \
--to=lkp@intel.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=eric.dumazet@gmail.com \
--cc=jasowang@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-um@lists.infradead.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.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 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).