[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201812161024.RzDJ565I%fengguang.wu@intel.com>
Date: Sun, 16 Dec 2018 10:58:25 +0800
From: kbuild test robot <lkp@...el.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: kbuild-all@...org, netdev@...r.kernel.org
Subject: [net-next:master 1421/1425] net/core/dev.c:5567:6: warning: passing
argument 2 of 'ptype->callbacks.gro_receive' from incompatible pointer type
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 63de273f34b5eeb5ead8440f20516fae9b7b1165
commit: aaa5d90b395a72faff797b00d815165ee0e664c0 [1421/1425] net: use indirect call wrappers at GRO network layer
config: i386-randconfig-h0-12160832 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
git checkout aaa5d90b395a72faff797b00d815165ee0e664c0
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
In file included from net/core/dev.c:148:0:
net/core/dev.c: In function 'napi_gro_complete':
net/core/dev.c:5364:26: error: 'inet_gro_complete' undeclared (first use in this function)
ipv6_gro_complete, inet_gro_complete,
^
include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
#define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
^
net/core/dev.c:5363:9: note: in expansion of macro 'INDIRECT_CALL_INET'
err = INDIRECT_CALL_INET(ptype->callbacks.gro_complete,
^
net/core/dev.c:5364:26: note: each undeclared identifier is reported only once for each function it appears in
ipv6_gro_complete, inet_gro_complete,
^
include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
#define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
^
net/core/dev.c:5363:9: note: in expansion of macro 'INDIRECT_CALL_INET'
err = INDIRECT_CALL_INET(ptype->callbacks.gro_complete,
^
net/core/dev.c:5365:7: warning: passing argument 2 of 'ptype->callbacks.gro_complete' makes integer from pointer without a cast
skb, 0);
^
include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
#define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
^
net/core/dev.c:5363:9: note: in expansion of macro 'INDIRECT_CALL_INET'
err = INDIRECT_CALL_INET(ptype->callbacks.gro_complete,
^
net/core/dev.c:5365:7: note: expected 'int' but argument is of type 'struct sk_buff *'
skb, 0);
^
include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
#define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
^
net/core/dev.c:5363:9: note: in expansion of macro 'INDIRECT_CALL_INET'
err = INDIRECT_CALL_INET(ptype->callbacks.gro_complete,
^
net/core/dev.c:5363:28: error: too many arguments to function 'ptype->callbacks.gro_complete'
err = INDIRECT_CALL_INET(ptype->callbacks.gro_complete,
^
include/linux/indirect_call_wrapper.h:32:39: note: in definition of macro 'INDIRECT_CALL_2'
#define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
^
net/core/dev.c:5363:9: note: in expansion of macro 'INDIRECT_CALL_INET'
err = INDIRECT_CALL_INET(ptype->callbacks.gro_complete,
^
net/core/dev.c: In function 'dev_gro_receive':
net/core/dev.c:5566:24: error: 'inet_gro_receive' undeclared (first use in this function)
ipv6_gro_receive, inet_gro_receive,
^
include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
#define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
^
net/core/dev.c:5565:8: note: in expansion of macro 'INDIRECT_CALL_INET'
pp = INDIRECT_CALL_INET(ptype->callbacks.gro_receive,
^
>> net/core/dev.c:5567:6: warning: passing argument 2 of 'ptype->callbacks.gro_receive' from incompatible pointer type
gro_head, skb);
^
include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
#define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
^
net/core/dev.c:5565:8: note: in expansion of macro 'INDIRECT_CALL_INET'
pp = INDIRECT_CALL_INET(ptype->callbacks.gro_receive,
^
net/core/dev.c:5567:6: note: expected 'struct sk_buff *' but argument is of type 'struct list_head *'
gro_head, skb);
^
include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
#define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
^
net/core/dev.c:5565:8: note: in expansion of macro 'INDIRECT_CALL_INET'
pp = INDIRECT_CALL_INET(ptype->callbacks.gro_receive,
^
net/core/dev.c:5565:27: error: too many arguments to function 'ptype->callbacks.gro_receive'
pp = INDIRECT_CALL_INET(ptype->callbacks.gro_receive,
^
include/linux/indirect_call_wrapper.h:32:39: note: in definition of macro 'INDIRECT_CALL_2'
#define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
^
net/core/dev.c:5565:8: note: in expansion of macro 'INDIRECT_CALL_INET'
pp = INDIRECT_CALL_INET(ptype->callbacks.gro_receive,
^
vim +5567 net/core/dev.c
5511
5512 INDIRECT_CALLABLE_DECLARE(struct sk_buff *inet_gro_receive(struct list_head *,
5513 struct sk_buff *));
5514 INDIRECT_CALLABLE_DECLARE(struct sk_buff *ipv6_gro_receive(struct list_head *,
5515 struct sk_buff *));
5516 static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
5517 {
5518 u32 hash = skb_get_hash_raw(skb) & (GRO_HASH_BUCKETS - 1);
5519 struct list_head *head = &offload_base;
5520 struct packet_offload *ptype;
5521 __be16 type = skb->protocol;
5522 struct list_head *gro_head;
5523 struct sk_buff *pp = NULL;
5524 enum gro_result ret;
5525 int same_flow;
5526 int grow;
5527
5528 if (netif_elide_gro(skb->dev))
5529 goto normal;
5530
5531 gro_head = gro_list_prepare(napi, skb);
5532
5533 rcu_read_lock();
5534 list_for_each_entry_rcu(ptype, head, list) {
5535 if (ptype->type != type || !ptype->callbacks.gro_receive)
5536 continue;
5537
5538 skb_set_network_header(skb, skb_gro_offset(skb));
5539 skb_reset_mac_len(skb);
5540 NAPI_GRO_CB(skb)->same_flow = 0;
5541 NAPI_GRO_CB(skb)->flush = skb_is_gso(skb) || skb_has_frag_list(skb);
5542 NAPI_GRO_CB(skb)->free = 0;
5543 NAPI_GRO_CB(skb)->encap_mark = 0;
5544 NAPI_GRO_CB(skb)->recursion_counter = 0;
5545 NAPI_GRO_CB(skb)->is_fou = 0;
5546 NAPI_GRO_CB(skb)->is_atomic = 1;
5547 NAPI_GRO_CB(skb)->gro_remcsum_start = 0;
5548
5549 /* Setup for GRO checksum validation */
5550 switch (skb->ip_summed) {
5551 case CHECKSUM_COMPLETE:
5552 NAPI_GRO_CB(skb)->csum = skb->csum;
5553 NAPI_GRO_CB(skb)->csum_valid = 1;
5554 NAPI_GRO_CB(skb)->csum_cnt = 0;
5555 break;
5556 case CHECKSUM_UNNECESSARY:
5557 NAPI_GRO_CB(skb)->csum_cnt = skb->csum_level + 1;
5558 NAPI_GRO_CB(skb)->csum_valid = 0;
5559 break;
5560 default:
5561 NAPI_GRO_CB(skb)->csum_cnt = 0;
5562 NAPI_GRO_CB(skb)->csum_valid = 0;
5563 }
5564
5565 pp = INDIRECT_CALL_INET(ptype->callbacks.gro_receive,
> 5566 ipv6_gro_receive, inet_gro_receive,
> 5567 gro_head, skb);
5568 break;
5569 }
5570 rcu_read_unlock();
5571
5572 if (&ptype->list == head)
5573 goto normal;
5574
5575 if (IS_ERR(pp) && PTR_ERR(pp) == -EINPROGRESS) {
5576 ret = GRO_CONSUMED;
5577 goto ok;
5578 }
5579
5580 same_flow = NAPI_GRO_CB(skb)->same_flow;
5581 ret = NAPI_GRO_CB(skb)->free ? GRO_MERGED_FREE : GRO_MERGED;
5582
5583 if (pp) {
5584 skb_list_del_init(pp);
5585 napi_gro_complete(pp);
5586 napi->gro_hash[hash].count--;
5587 }
5588
5589 if (same_flow)
5590 goto ok;
5591
5592 if (NAPI_GRO_CB(skb)->flush)
5593 goto normal;
5594
5595 if (unlikely(napi->gro_hash[hash].count >= MAX_GRO_SKBS)) {
5596 gro_flush_oldest(gro_head);
5597 } else {
5598 napi->gro_hash[hash].count++;
5599 }
5600 NAPI_GRO_CB(skb)->count = 1;
5601 NAPI_GRO_CB(skb)->age = jiffies;
5602 NAPI_GRO_CB(skb)->last = skb;
5603 skb_shinfo(skb)->gso_size = skb_gro_len(skb);
5604 list_add(&skb->list, gro_head);
5605 ret = GRO_HELD;
5606
5607 pull:
5608 grow = skb_gro_offset(skb) - skb_headlen(skb);
5609 if (grow > 0)
5610 gro_pull_from_frag0(skb, grow);
5611 ok:
5612 if (napi->gro_hash[hash].count) {
5613 if (!test_bit(hash, &napi->gro_bitmask))
5614 __set_bit(hash, &napi->gro_bitmask);
5615 } else if (test_bit(hash, &napi->gro_bitmask)) {
5616 __clear_bit(hash, &napi->gro_bitmask);
5617 }
5618
5619 return ret;
5620
5621 normal:
5622 ret = GRO_NORMAL;
5623 goto pull;
5624 }
5625
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (28320 bytes)
Powered by blists - more mailing lists