From: kbuild test robot <lkp@intel.com>
To: Tom Herbert <tom@quantonium.net>
Cc: kbuild-all@01.org, davem@davemloft.net, netdev@vger.kernel.org,
rohit@quantonium.net, Tom Herbert <tom@quantonium.net>
Subject: Re: [PATCH v3 net-next 1/8] flow_dissector: Change skbuf argument to be non const
Date: Sun, 1 Oct 2017 05:46:12 +0800 [thread overview]
Message-ID: <201710010520.s2rQTxDR%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170928214823.2426-1-tom@quantonium.net>
[-- Attachment #1: Type: text/plain, Size: 7201 bytes --]
Hi Tom,
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Tom-Herbert/flow_dissector-Change-skbuf-argument-to-be-non-const/20171001-052131
config: x86_64-randconfig-x010-201740 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
drivers/net/ethernet/sfc/rx.c: In function 'efx_filter_rfs':
>> drivers/net/ethernet/sfc/rx.c:842:34: warning: passing argument 1 of 'skb_flow_dissect_flow_keys' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
if (!skb_flow_dissect_flow_keys(skb, &fk, 0))
^~~
In file included from include/linux/ip.h:20:0,
from drivers/net/ethernet/sfc/rx.c:14:
include/linux/skbuff.h:1189:20: note: expected 'struct sk_buff *' but argument is of type 'const struct sk_buff *'
static inline bool skb_flow_dissect_flow_keys(struct sk_buff *skb,
^~~~~~~~~~~~~~~~~~~~~~~~~~
--
drivers/net/ethernet/sfc/falcon/rx.c: In function 'ef4_filter_rfs':
>> drivers/net/ethernet/sfc/falcon/rx.c:848:34: warning: passing argument 1 of 'skb_flow_dissect_flow_keys' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
if (!skb_flow_dissect_flow_keys(skb, &fk, 0))
^~~
In file included from include/linux/ip.h:20:0,
from drivers/net/ethernet/sfc/falcon/rx.c:14:
include/linux/skbuff.h:1189:20: note: expected 'struct sk_buff *' but argument is of type 'const struct sk_buff *'
static inline bool skb_flow_dissect_flow_keys(struct sk_buff *skb,
^~~~~~~~~~~~~~~~~~~~~~~~~~
vim +842 drivers/net/ethernet/sfc/rx.c
add724771 Ben Hutchings 2012-11-08 829
add724771 Ben Hutchings 2012-11-08 830 int efx_filter_rfs(struct net_device *net_dev, const struct sk_buff *skb,
add724771 Ben Hutchings 2012-11-08 831 u16 rxq_index, u32 flow_id)
add724771 Ben Hutchings 2012-11-08 832 {
add724771 Ben Hutchings 2012-11-08 833 struct efx_nic *efx = netdev_priv(net_dev);
add724771 Ben Hutchings 2012-11-08 834 struct efx_channel *channel;
add724771 Ben Hutchings 2012-11-08 835 struct efx_filter_spec spec;
68bb399e6 Edward Cree 2016-05-26 836 struct flow_keys fk;
add724771 Ben Hutchings 2012-11-08 837 int rc;
add724771 Ben Hutchings 2012-11-08 838
faf8dcc12 Jon Cooper 2016-05-31 839 if (flow_id == RPS_FLOW_ID_INVALID)
faf8dcc12 Jon Cooper 2016-05-31 840 return -EINVAL;
faf8dcc12 Jon Cooper 2016-05-31 841
68bb399e6 Edward Cree 2016-05-26 @842 if (!skb_flow_dissect_flow_keys(skb, &fk, 0))
68bb399e6 Edward Cree 2016-05-26 843 return -EPROTONOSUPPORT;
add724771 Ben Hutchings 2012-11-08 844
68bb399e6 Edward Cree 2016-05-26 845 if (fk.basic.n_proto != htons(ETH_P_IP) && fk.basic.n_proto != htons(ETH_P_IPV6))
68bb399e6 Edward Cree 2016-05-26 846 return -EPROTONOSUPPORT;
68bb399e6 Edward Cree 2016-05-26 847 if (fk.control.flags & FLOW_DIS_IS_FRAGMENT)
c47b2d9d5 Ben Hutchings 2013-09-03 848 return -EPROTONOSUPPORT;
c47b2d9d5 Ben Hutchings 2013-09-03 849
c47b2d9d5 Ben Hutchings 2013-09-03 850 efx_filter_init_rx(&spec, EFX_FILTER_PRI_HINT,
c47b2d9d5 Ben Hutchings 2013-09-03 851 efx->rx_scatter ? EFX_FILTER_FLAG_RX_SCATTER : 0,
c47b2d9d5 Ben Hutchings 2013-09-03 852 rxq_index);
c47b2d9d5 Ben Hutchings 2013-09-03 853 spec.match_flags =
c47b2d9d5 Ben Hutchings 2013-09-03 854 EFX_FILTER_MATCH_ETHER_TYPE | EFX_FILTER_MATCH_IP_PROTO |
c47b2d9d5 Ben Hutchings 2013-09-03 855 EFX_FILTER_MATCH_LOC_HOST | EFX_FILTER_MATCH_LOC_PORT |
c47b2d9d5 Ben Hutchings 2013-09-03 856 EFX_FILTER_MATCH_REM_HOST | EFX_FILTER_MATCH_REM_PORT;
68bb399e6 Edward Cree 2016-05-26 857 spec.ether_type = fk.basic.n_proto;
68bb399e6 Edward Cree 2016-05-26 858 spec.ip_proto = fk.basic.ip_proto;
c47b2d9d5 Ben Hutchings 2013-09-03 859
68bb399e6 Edward Cree 2016-05-26 860 if (fk.basic.n_proto == htons(ETH_P_IP)) {
68bb399e6 Edward Cree 2016-05-26 861 spec.rem_host[0] = fk.addrs.v4addrs.src;
68bb399e6 Edward Cree 2016-05-26 862 spec.loc_host[0] = fk.addrs.v4addrs.dst;
c47b2d9d5 Ben Hutchings 2013-09-03 863 } else {
68bb399e6 Edward Cree 2016-05-26 864 memcpy(spec.rem_host, &fk.addrs.v6addrs.src, sizeof(struct in6_addr));
68bb399e6 Edward Cree 2016-05-26 865 memcpy(spec.loc_host, &fk.addrs.v6addrs.dst, sizeof(struct in6_addr));
c47b2d9d5 Ben Hutchings 2013-09-03 866 }
c47b2d9d5 Ben Hutchings 2013-09-03 867
68bb399e6 Edward Cree 2016-05-26 868 spec.rem_port = fk.ports.src;
68bb399e6 Edward Cree 2016-05-26 869 spec.loc_port = fk.ports.dst;
add724771 Ben Hutchings 2012-11-08 870
add724771 Ben Hutchings 2012-11-08 871 rc = efx->type->filter_rfs_insert(efx, &spec);
add724771 Ben Hutchings 2012-11-08 872 if (rc < 0)
add724771 Ben Hutchings 2012-11-08 873 return rc;
add724771 Ben Hutchings 2012-11-08 874
add724771 Ben Hutchings 2012-11-08 875 /* Remember this so we can check whether to expire the filter later */
faf8dcc12 Jon Cooper 2016-05-31 876 channel = efx_get_channel(efx, rxq_index);
faf8dcc12 Jon Cooper 2016-05-31 877 channel->rps_flow_id[rc] = flow_id;
add724771 Ben Hutchings 2012-11-08 878 ++channel->rfs_filters_added;
add724771 Ben Hutchings 2012-11-08 879
68bb399e6 Edward Cree 2016-05-26 880 if (spec.ether_type == htons(ETH_P_IP))
add724771 Ben Hutchings 2012-11-08 881 netif_info(efx, rx_status, efx->net_dev,
add724771 Ben Hutchings 2012-11-08 882 "steering %s %pI4:%u:%pI4:%u to queue %u [flow %u filter %d]\n",
c47b2d9d5 Ben Hutchings 2013-09-03 883 (spec.ip_proto == IPPROTO_TCP) ? "TCP" : "UDP",
68bb399e6 Edward Cree 2016-05-26 884 spec.rem_host, ntohs(spec.rem_port), spec.loc_host,
68bb399e6 Edward Cree 2016-05-26 885 ntohs(spec.loc_port), rxq_index, flow_id, rc);
c47b2d9d5 Ben Hutchings 2013-09-03 886 else
c47b2d9d5 Ben Hutchings 2013-09-03 887 netif_info(efx, rx_status, efx->net_dev,
c47b2d9d5 Ben Hutchings 2013-09-03 888 "steering %s [%pI6]:%u:[%pI6]:%u to queue %u [flow %u filter %d]\n",
c47b2d9d5 Ben Hutchings 2013-09-03 889 (spec.ip_proto == IPPROTO_TCP) ? "TCP" : "UDP",
68bb399e6 Edward Cree 2016-05-26 890 spec.rem_host, ntohs(spec.rem_port), spec.loc_host,
68bb399e6 Edward Cree 2016-05-26 891 ntohs(spec.loc_port), rxq_index, flow_id, rc);
add724771 Ben Hutchings 2012-11-08 892
add724771 Ben Hutchings 2012-11-08 893 return rc;
add724771 Ben Hutchings 2012-11-08 894 }
add724771 Ben Hutchings 2012-11-08 895
:::::: The code at line 842 was first introduced by commit
:::::: 68bb399e656f244d3d173a20a8280c167632fca8 sfc: use flow dissector helpers for aRFS
:::::: TO: Edward Cree <ecree@solarflare.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30375 bytes --]
prev parent reply other threads:[~2017-09-30 21:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-28 21:48 [PATCH v3 net-next 1/8] flow_dissector: Change skbuf argument to be non const Tom Herbert
2017-09-28 21:48 ` [PATCH v3 net-next 2/8] flow_dissector: Move ETH_P_TEB processing to main switch Tom Herbert
2017-09-28 21:48 ` [PATCH v3 net-next 3/8] udp: Check static key udp_encap_needed in udp_gro_receive Tom Herbert
2017-09-28 21:48 ` [PATCH v3 net-next 4/8] flow_dissector: Add protocol specific flow dissection offload Tom Herbert
2017-09-28 21:48 ` [PATCH v3 net-next 5/8] ip: Add callbacks to flow dissection by IP protocol Tom Herbert
2017-09-28 21:48 ` [PATCH v3 net-next 6/8] udp: flow dissector offload Tom Herbert
2017-09-28 21:48 ` [PATCH v3 net-next 7/8] fou: Support flow dissection Tom Herbert
2017-09-28 21:48 ` [PATCH v3 net-next 8/8] vxlan: support flow dissect Tom Herbert
2017-09-30 21:46 ` kbuild test robot [this message]
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=201710010520.s2rQTxDR%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=kbuild-all@01.org \
--cc=netdev@vger.kernel.org \
--cc=rohit@quantonium.net \
--cc=tom@quantonium.net \
/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