* [isilence:zc/veth2 14/16] io_uring/zc_rx.c:644:9: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}'
@ 2023-10-20 4:18 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-10-20 4:18 UTC (permalink / raw)
To: David Wei; +Cc: oe-kbuild-all, Pavel Begunkov
tree: https://github.com/isilence/linux zc/veth2
head: 731b7375c43d08e971bcafcd9e90c1c0c8250678
commit: 1e65d03befc872b1f243c468fd33761c1a5d253f [14/16] make it work
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20231020/202310201228.dMoBeQiV-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231020/202310201228.dMoBeQiV-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/202310201228.dMoBeQiV-lkp@intel.com/
All warnings (new ones prefixed by >>):
io_uring/zc_rx.c: In function 'is_zc_rx_page':
io_uring/zc_rx.c:62:51: warning: right shift count >= width of type [-Wshift-count-overflow]
return PagePrivate(page) && ((page_private(page) >> 48) == 0xface);
^~
io_uring/zc_rx.c: At top level:
io_uring/zc_rx.c:186:5: warning: no previous declaration for 'io_zc_rx_create_pool' [-Wmissing-declarations]
int io_zc_rx_create_pool(struct io_ring_ctx *ctx,
^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kernel.h:30:0,
from io_uring/zc_rx.c:2:
io_uring/zc_rx.c: In function 'zc_rx_recv_skb':
>> io_uring/zc_rx.c:644:9: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' [-Wformat=]
printk("----- zc_rx_recv_skb: start=%d, offset=%d, len=%lu, nr_frags=%d\n", start, offset, len, skb_shinfo(skb)->nr_frags);
^
include/linux/printk.h:427:11: note: in definition of macro 'printk_index_wrap'
_p_func(_fmt, ##__VA_ARGS__); \
^~~~
io_uring/zc_rx.c:644:2: note: in expansion of macro 'printk'
printk("----- zc_rx_recv_skb: start=%d, offset=%d, len=%lu, nr_frags=%d\n", start, offset, len, skb_shinfo(skb)->nr_frags);
^~~~~~
vim +644 io_uring/zc_rx.c
623
624 static int
625 zc_rx_recv_skb(read_descriptor_t *desc, struct sk_buff *skb,
626 unsigned int offset, size_t len)
627 {
628 struct io_zc_rx_ifq *ifq;
629 struct sk_buff *frag_iter;
630 unsigned start, start_off;
631 int i, copy, end, off;
632 int ret = 0;
633
634 ifq = io_zc_rx_ifq_skb(skb);
635 if (!ifq) {
636 pr_debug("non zerocopy pages are not supported\n");
637 return -EFAULT;
638 }
639 start = skb_headlen(skb);
640 start_off = offset;
641
642 // TODO: copy payload in skb linear data */
643 WARN_ON(offset < start);
> 644 printk("----- zc_rx_recv_skb: start=%d, offset=%d, len=%lu, nr_frags=%d\n", start, offset, len, skb_shinfo(skb)->nr_frags);
645
646 // TODO: make sure theres at least nr_frags entries in cq ring
647 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
648 const skb_frag_t *frag;
649
650 WARN_ON(start > offset + len);
651
652 frag = &skb_shinfo(skb)->frags[i];
653 end = start + skb_frag_size(frag);
654 printk("----- zc_rx_recv_skb: skb frag size=%d, end=%d\n", skb_frag_size(frag), end);
655
656 if (offset < end) {
657 copy = end - offset;
658 if (copy > len)
659 copy = len;
660
661 off = offset - start;
662 ret = zc_rx_recv_frag(ifq, frag, off, copy);
663 if (ret < 0) {
664 printk("----- zc_rx_recv_skb: recv_frag err=%d\n", ret);
665 goto out;
666 }
667
668 offset += ret;
669 len -= ret;
670 if (len == 0 || ret != copy)
671 goto out;
672 }
673 start = end;
674 }
675
676 skb_walk_frags(skb, frag_iter) {
677 WARN_ON(start > offset + len);
678
679 end = start + frag_iter->len;
680 if (offset < end) {
681 copy = end - offset;
682 if (copy > len)
683 copy = len;
684
685 off = offset - start;
686 ret = zc_rx_recv_skb(desc, frag_iter, off, copy);
687 if (ret < 0)
688 goto out;
689
690 offset += ret;
691 len -= ret;
692 if (len == 0 || ret != copy)
693 goto out;
694 }
695 start = end;
696 }
697
698 out:
699 printk("----- zc_rx_recv_skb: updating tail, tail=%u, cached_tail=%u\n", ifq->ring->cq.tail, ifq->cached_cq_tail);
700 smp_store_release(&ifq->ring->cq.tail, ifq->cached_cq_tail);
701 if (offset == start_off)
702 return ret;
703 printk("----- zc_rx_recv_skb: out, offset=%d, start_off=%d\n", offset, start_off);
704 return offset - start_off;
705 }
706
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-20 4:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-20 4:18 [isilence:zc/veth2 14/16] io_uring/zc_rx.c:644:9: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.