[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202212012019.CCaNTVih-lkp@intel.com>
Date: Thu, 1 Dec 2022 21:08:45 +0800
From: kernel test robot <lkp@...el.com>
To: Stanislav Fomichev <sdf@...gle.com>, bpf@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, ast@...nel.org,
daniel@...earbox.net, andrii@...nel.org, martin.lau@...ux.dev,
song@...nel.org, yhs@...com, john.fastabend@...il.com,
kpsingh@...nel.org, sdf@...gle.com, haoluo@...gle.com,
jolsa@...nel.org,
Toke Høiland-Jørgensen <toke@...hat.com>,
Saeed Mahameed <saeedm@...dia.com>,
David Ahern <dsahern@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
Willem de Bruijn <willemb@...gle.com>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Anatoly Burakov <anatoly.burakov@...el.com>,
Alexander Lobakin <alexandr.lobakin@...el.com>,
Magnus Karlsson <magnus.karlsson@...il.com>,
Maryam Tahhan <mtahhan@...hat.com>, xdp-hints@...-project.net,
netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next v3 10/11] mlx5: Support RX XDP metadata
Hi Stanislav,
I love your patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Stanislav-Fomichev/xdp-hints-via-kfuncs/20221130-092141
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20221129193452.3448944-11-sdf%40google.com
patch subject: [PATCH bpf-next v3 10/11] mlx5: Support RX XDP metadata
config: ia64-allmodconfig
compiler: ia64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/2c58eefabc23df0888018d4ae3947270ed005c46
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Stanislav-Fomichev/xdp-hints-via-kfuncs/20221130-092141
git checkout 2c58eefabc23df0888018d4ae3947270ed005c46
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/net/ethernet/mellanox/mlx5/core/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from include/net/sock.h:62,
from include/linux/tcp.h:19,
from include/linux/ipv6.h:93,
from drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:34:
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c: In function 'mlx5e_handle_rx_cqe_rep':
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:1821:39: warning: passing argument 3 of 'rq-><Ud688>.wqe.skb_from_cqe' makes pointer from integer without a cast [-Wint-conversion]
1821 | rq, wi, cqe_bcnt);
| ^~~~~~~~
| |
| u32 {aka unsigned int}
include/linux/indirect_call_wrapper.h:43:43: note: in definition of macro 'INDIRECT_CALL_2'
43 | #define INDIRECT_CALL_2(f, f2, f1, ...) f(__VA_ARGS__)
| ^~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:1821:39: note: expected 'struct mlx5_cqe64 *' but argument is of type 'u32' {aka 'unsigned int'}
1821 | rq, wi, cqe_bcnt);
| ^~~~~~~~
include/linux/indirect_call_wrapper.h:43:43: note: in definition of macro 'INDIRECT_CALL_2'
43 | #define INDIRECT_CALL_2(f, f2, f1, ...) f(__VA_ARGS__)
| ^~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:1818:31: error: too few arguments to function 'rq-><Ud688>.wqe.skb_from_cqe'
1818 | skb = INDIRECT_CALL_2(rq->wqe.skb_from_cqe,
| ^~
include/linux/indirect_call_wrapper.h:43:41: note: in definition of macro 'INDIRECT_CALL_2'
43 | #define INDIRECT_CALL_2(f, f2, f1, ...) f(__VA_ARGS__)
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c: In function 'mlx5e_handle_rx_cqe_mpwrq_rep':
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:1880:39: warning: passing argument 3 of 'rq-><Ud688>.mpwqe.skb_from_cqe_mpwrq' makes pointer from integer without a cast [-Wint-conversion]
1880 | rq, wi, cqe_bcnt, head_offset, page_idx);
| ^~~~~~~~
| |
| u16 {aka short unsigned int}
include/linux/indirect_call_wrapper.h:43:43: note: in definition of macro 'INDIRECT_CALL_2'
43 | #define INDIRECT_CALL_2(f, f2, f1, ...) f(__VA_ARGS__)
| ^~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:1880:39: note: expected 'struct mlx5_cqe64 *' but argument is of type 'u16' {aka 'short unsigned int'}
1880 | rq, wi, cqe_bcnt, head_offset, page_idx);
| ^~~~~~~~
include/linux/indirect_call_wrapper.h:43:43: note: in definition of macro 'INDIRECT_CALL_2'
43 | #define INDIRECT_CALL_2(f, f2, f1, ...) f(__VA_ARGS__)
| ^~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:1877:31: error: too few arguments to function 'rq-><Ud688>.mpwqe.skb_from_cqe_mpwrq'
1877 | skb = INDIRECT_CALL_2(rq->mpwqe.skb_from_cqe_mpwrq,
| ^~
include/linux/indirect_call_wrapper.h:43:41: note: in definition of macro 'INDIRECT_CALL_2'
43 | #define INDIRECT_CALL_2(f, f2, f1, ...) f(__VA_ARGS__)
| ^
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c: In function 'mlx5i_handle_rx_cqe':
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:2488:39: warning: passing argument 3 of 'rq-><Ud688>.wqe.skb_from_cqe' makes pointer from integer without a cast [-Wint-conversion]
2488 | rq, wi, cqe_bcnt);
| ^~~~~~~~
| |
| u32 {aka unsigned int}
include/linux/indirect_call_wrapper.h:43:43: note: in definition of macro 'INDIRECT_CALL_2'
43 | #define INDIRECT_CALL_2(f, f2, f1, ...) f(__VA_ARGS__)
| ^~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:2488:39: note: expected 'struct mlx5_cqe64 *' but argument is of type 'u32' {aka 'unsigned int'}
2488 | rq, wi, cqe_bcnt);
| ^~~~~~~~
include/linux/indirect_call_wrapper.h:43:43: note: in definition of macro 'INDIRECT_CALL_2'
43 | #define INDIRECT_CALL_2(f, f2, f1, ...) f(__VA_ARGS__)
| ^~~~~~~~~~~
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c:2485:31: error: too few arguments to function 'rq-><Ud688>.wqe.skb_from_cqe'
2485 | skb = INDIRECT_CALL_2(rq->wqe.skb_from_cqe,
| ^~
include/linux/indirect_call_wrapper.h:43:41: note: in definition of macro 'INDIRECT_CALL_2'
43 | #define INDIRECT_CALL_2(f, f2, f1, ...) f(__VA_ARGS__)
| ^
vim +1818 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
e586b3b0baee89f Amir Vadai 2015-05-28 1795
e80541ecabd57b6 Saeed Mahameed 2017-06-05 1796 #ifdef CONFIG_MLX5_ESWITCH
5adf4c475aaa037 Tariq Toukan 2020-04-30 1797 static void mlx5e_handle_rx_cqe_rep(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe)
f5f82476090fd2c Or Gerlitz 2016-09-22 1798 {
f5f82476090fd2c Or Gerlitz 2016-09-22 1799 struct net_device *netdev = rq->netdev;
f5f82476090fd2c Or Gerlitz 2016-09-22 1800 struct mlx5e_priv *priv = netdev_priv(netdev);
1d447a39142e0ea Saeed Mahameed 2017-04-24 1801 struct mlx5e_rep_priv *rpriv = priv->ppriv;
1d447a39142e0ea Saeed Mahameed 2017-04-24 1802 struct mlx5_eswitch_rep *rep = rpriv->rep;
99cbfa93a6122b1 Tariq Toukan 2018-04-02 1803 struct mlx5_wq_cyc *wq = &rq->wqe.wq;
accd58833237d4a Tariq Toukan 2017-01-29 1804 struct mlx5e_wqe_frag_info *wi;
f5f82476090fd2c Or Gerlitz 2016-09-22 1805 struct sk_buff *skb;
f5f82476090fd2c Or Gerlitz 2016-09-22 1806 u32 cqe_bcnt;
99cbfa93a6122b1 Tariq Toukan 2018-04-02 1807 u16 ci;
f5f82476090fd2c Or Gerlitz 2016-09-22 1808
99cbfa93a6122b1 Tariq Toukan 2018-04-02 1809 ci = mlx5_wq_cyc_ctr2ix(wq, be16_to_cpu(cqe->wqe_counter));
99cbfa93a6122b1 Tariq Toukan 2018-04-02 1810 wi = get_frag(rq, ci);
f5f82476090fd2c Or Gerlitz 2016-09-22 1811 cqe_bcnt = be32_to_cpu(cqe->byte_cnt);
f5f82476090fd2c Or Gerlitz 2016-09-22 1812
0a35ab3e138296c Saeed Mahameed 2019-06-14 1813 if (unlikely(MLX5E_RX_ERR_CQE(cqe))) {
5dd29f40b25f91f Gal Pressman 2021-12-22 1814 mlx5e_handle_rx_err_cqe(rq, cqe);
0a35ab3e138296c Saeed Mahameed 2019-06-14 1815 goto free_wqe;
0a35ab3e138296c Saeed Mahameed 2019-06-14 1816 }
0a35ab3e138296c Saeed Mahameed 2019-06-14 1817
2901a5c618dd18b Tariq Toukan 2020-04-30 @1818 skb = INDIRECT_CALL_2(rq->wqe.skb_from_cqe,
2901a5c618dd18b Tariq Toukan 2020-04-30 1819 mlx5e_skb_from_cqe_linear,
2901a5c618dd18b Tariq Toukan 2020-04-30 1820 mlx5e_skb_from_cqe_nonlinear,
84a137f051a571f Maxim Mikityanskiy 2022-01-20 1821 rq, wi, cqe_bcnt);
accd58833237d4a Tariq Toukan 2017-01-29 1822 if (!skb) {
069d11465a802a2 Tariq Toukan 2018-05-02 1823 /* probably for XDP */
121e89275471dcc Tariq Toukan 2017-12-12 1824 if (__test_and_clear_bit(MLX5E_RQ_FLAG_XDP_XMIT, rq->flags)) {
069d11465a802a2 Tariq Toukan 2018-05-02 1825 /* do not return page to cache,
069d11465a802a2 Tariq Toukan 2018-05-02 1826 * it will be returned on XDP_TX completion.
069d11465a802a2 Tariq Toukan 2018-05-02 1827 */
99cbfa93a6122b1 Tariq Toukan 2018-04-02 1828 goto wq_cyc_pop;
accd58833237d4a Tariq Toukan 2017-01-29 1829 }
069d11465a802a2 Tariq Toukan 2018-05-02 1830 goto free_wqe;
accd58833237d4a Tariq Toukan 2017-01-29 1831 }
f5f82476090fd2c Or Gerlitz 2016-09-22 1832
f5f82476090fd2c Or Gerlitz 2016-09-22 1833 mlx5e_complete_rx_cqe(rq, cqe, cqe_bcnt, skb);
f5f82476090fd2c Or Gerlitz 2016-09-22 1834
f5f82476090fd2c Or Gerlitz 2016-09-22 1835 if (rep->vlan && skb_vlan_tag_present(skb))
f5f82476090fd2c Or Gerlitz 2016-09-22 1836 skb_vlan_pop(skb);
f5f82476090fd2c Or Gerlitz 2016-09-22 1837
28e7606fa8f106c Ariel Levkovich 2021-10-26 1838 mlx5e_rep_tc_receive(cqe, rq, skb);
b8ce90370977dbe Paul Blakey 2020-02-16 1839
069d11465a802a2 Tariq Toukan 2018-05-02 1840 free_wqe:
cb5189d173097af Tariq Toukan 2018-06-12 1841 mlx5e_free_rx_wqe(rq, wi, true);
99cbfa93a6122b1 Tariq Toukan 2018-04-02 1842 wq_cyc_pop:
99cbfa93a6122b1 Tariq Toukan 2018-04-02 1843 mlx5_wq_cyc_pop(wq);
f5f82476090fd2c Or Gerlitz 2016-09-22 1844 }
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1845
5adf4c475aaa037 Tariq Toukan 2020-04-30 1846 static void mlx5e_handle_rx_cqe_mpwrq_rep(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe)
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1847 {
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1848 u16 cstrides = mpwrq_get_cqe_consumed_strides(cqe);
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1849 u16 wqe_id = be16_to_cpu(cqe->wqe_id);
258e655c00734d2 Maxim Mikityanskiy 2022-09-27 1850 struct mlx5e_mpw_info *wi = mlx5e_get_mpw_info(rq, wqe_id);
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1851 u16 stride_ix = mpwrq_get_cqe_stride_index(cqe);
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1852 u32 wqe_offset = stride_ix << rq->mpwqe.log_stride_sz;
997ce6affe264e8 Maxim Mikityanskiy 2022-09-27 1853 u32 head_offset = wqe_offset & ((1 << rq->mpwqe.page_shift) - 1);
997ce6affe264e8 Maxim Mikityanskiy 2022-09-27 1854 u32 page_idx = wqe_offset >> rq->mpwqe.page_shift;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1855 struct mlx5e_rx_wqe_ll *wqe;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1856 struct mlx5_wq_ll *wq;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1857 struct sk_buff *skb;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1858 u16 cqe_bcnt;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1859
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1860 wi->consumed_strides += cstrides;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1861
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1862 if (unlikely(MLX5E_RX_ERR_CQE(cqe))) {
5dd29f40b25f91f Gal Pressman 2021-12-22 1863 mlx5e_handle_rx_err_cqe(rq, cqe);
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1864 goto mpwrq_cqe_out;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1865 }
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1866
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1867 if (unlikely(mpwrq_is_filler_cqe(cqe))) {
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1868 struct mlx5e_rq_stats *stats = rq->stats;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1869
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1870 stats->mpwqe_filler_cqes++;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1871 stats->mpwqe_filler_strides += cstrides;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1872 goto mpwrq_cqe_out;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1873 }
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1874
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1875 cqe_bcnt = mpwrq_get_cqe_byte_cnt(cqe);
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1876
dfd9e7500cd4b21 Paul Blakey 2020-02-16 @1877 skb = INDIRECT_CALL_2(rq->mpwqe.skb_from_cqe_mpwrq,
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1878 mlx5e_skb_from_cqe_mpwrq_linear,
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1879 mlx5e_skb_from_cqe_mpwrq_nonlinear,
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1880 rq, wi, cqe_bcnt, head_offset, page_idx);
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1881 if (!skb)
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1882 goto mpwrq_cqe_out;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1883
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1884 mlx5e_complete_rx_cqe(rq, cqe, cqe_bcnt, skb);
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1885
28e7606fa8f106c Ariel Levkovich 2021-10-26 1886 mlx5e_rep_tc_receive(cqe, rq, skb);
b8ce90370977dbe Paul Blakey 2020-02-16 1887
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1888 mpwrq_cqe_out:
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1889 if (likely(wi->consumed_strides < rq->mpwqe.num_strides))
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1890 return;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1891
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1892 wq = &rq->mpwqe.wq;
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1893 wqe = mlx5_wq_ll_get_wqe(wq, wqe_id);
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1894 mlx5e_free_rx_mpwqe(rq, wi, true);
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1895 mlx5_wq_ll_pop(wq, cqe->wqe_id, &wqe->next.next_wqe_index);
dfd9e7500cd4b21 Paul Blakey 2020-02-16 1896 }
5adf4c475aaa037 Tariq Toukan 2020-04-30 1897
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (286853 bytes)
Powered by blists - more mailing lists