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 <ec...@solarflare.com>
:::::: CC: David S. Miller <da...@davemloft.net>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to