From: kernel test robot <lkp@intel.com>
To: Maxim Mikityanskiy <maximmi@mellanox.com>,
"David S. Miller" <davem@davemloft.net>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org,
Saeed Mahameed <saeedm@nvidia.com>,
Jakub Kicinski <kuba@kernel.org>,
Tariq Toukan <tariqt@mellanox.com>,
Maxim Mikityanskiy <maximmi@nvidia.com>
Subject: Re: [PATCH net-next 4/4] net/mlx5e: Support HTB offload
Date: Thu, 10 Dec 2020 07:54:31 +0800 [thread overview]
Message-ID: <202012100734.bev99ZnD-lkp@intel.com> (raw)
In-Reply-To: <20201209160251.19054-5-maximmi@mellanox.com>
[-- Attachment #1: Type: text/plain, Size: 9893 bytes --]
Hi Maxim,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Maxim-Mikityanskiy/HTB-offload/20201210-000703
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git afae3cc2da100ead3cd6ef4bb1fb8bc9d4b817c5
config: x86_64-randconfig-s021-20201210 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-179-ga00755aa-dirty
# https://github.com/0day-ci/linux/commit/2b06403da63c880ec87d0bcee80b8936116935c6
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Maxim-Mikityanskiy/HTB-offload/20201210-000703
git checkout 2b06403da63c880ec87d0bcee80b8936116935c6
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c:135:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct mlx5e_txqsq **qos_sqs @@ got struct mlx5e_txqsq [noderef] __rcu ** @@
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c:135:17: sparse: expected struct mlx5e_txqsq **qos_sqs
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c:135:17: sparse: got struct mlx5e_txqsq [noderef] __rcu **
>> drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c:149:50: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c:149:50: sparse: struct mlx5e_txqsq [noderef] __rcu *
>> drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c:149:50: sparse: struct mlx5e_txqsq *
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c:211:50: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c:211:50: sparse: struct mlx5e_txqsq [noderef] __rcu *
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c:211:50: sparse: struct mlx5e_txqsq *
--
>> drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:174:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct mlx5e_txqsq **qos_sqs @@ got struct mlx5e_txqsq [noderef] __rcu ** @@
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:174:17: sparse: expected struct mlx5e_txqsq **qos_sqs
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:174:17: sparse: got struct mlx5e_txqsq [noderef] __rcu **
>> drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:175:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:175:16: sparse: struct mlx5e_txqsq [noderef] __rcu *
>> drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:175:16: sparse: struct mlx5e_txqsq *
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:225:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct mlx5e_txqsq **qos_sqs @@ got struct mlx5e_txqsq [noderef] __rcu ** @@
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:225:17: sparse: expected struct mlx5e_txqsq **qos_sqs
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:225:17: sparse: got struct mlx5e_txqsq [noderef] __rcu **
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:245:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:245:9: sparse: struct mlx5e_txqsq [noderef] __rcu *
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:245:9: sparse: struct mlx5e_txqsq *
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:301:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct mlx5e_txqsq **qos_sqs @@ got struct mlx5e_txqsq [noderef] __rcu ** @@
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:302:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:302:14: sparse: struct mlx5e_txqsq [noderef] __rcu *
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:302:14: sparse: struct mlx5e_txqsq *
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:302:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:302:14: sparse: struct mlx5e_txqsq [noderef] __rcu *
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:302:14: sparse: struct mlx5e_txqsq *
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:326:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:326:22: sparse: struct mlx5e_txqsq [noderef] __rcu *
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:326:22: sparse: struct mlx5e_txqsq *
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:423:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct mlx5e_txqsq **qos_sqs @@ got struct mlx5e_txqsq [noderef] __rcu ** @@
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:423:17: sparse: expected struct mlx5e_txqsq **qos_sqs
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:423:17: sparse: got struct mlx5e_txqsq [noderef] __rcu **
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:431:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:431:22: sparse: struct mlx5e_txqsq [noderef] __rcu *
drivers/net/ethernet/mellanox/mlx5/core/en/qos.c:431:22: sparse: struct mlx5e_txqsq *
vim +135 drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
115
116 int mlx5e_napi_poll(struct napi_struct *napi, int budget)
117 {
118 struct mlx5e_channel *c = container_of(napi, struct mlx5e_channel,
119 napi);
120 struct mlx5e_ch_stats *ch_stats = c->stats;
121 struct mlx5e_xdpsq *xsksq = &c->xsksq;
122 struct mlx5e_rq *xskrq = &c->xskrq;
123 struct mlx5e_rq *rq = &c->rq;
124 struct mlx5e_txqsq **qos_sqs;
125 bool aff_change = false;
126 bool busy_xsk = false;
127 bool busy = false;
128 int work_done = 0;
129 u16 qos_sqs_size;
130 bool xsk_open;
131 int i;
132
133 rcu_read_lock();
134
> 135 qos_sqs = rcu_dereference(c->qos_sqs);
136
137 xsk_open = test_bit(MLX5E_CHANNEL_STATE_XSK, c->state);
138
139 ch_stats->poll++;
140
141 for (i = 0; i < c->num_tc; i++)
142 busy |= mlx5e_poll_tx_cq(&c->sq[i].cq, budget);
143
144 if (unlikely(qos_sqs)) {
145 smp_rmb(); /* Pairs with mlx5e_qos_alloc_queues. */
146 qos_sqs_size = READ_ONCE(c->qos_sqs_size);
147
148 for (i = 0; i < qos_sqs_size; i++) {
> 149 struct mlx5e_txqsq *sq = rcu_dereference(qos_sqs[i]);
150
151 if (sq)
152 busy |= mlx5e_poll_tx_cq(&sq->cq, budget);
153 }
154 }
155
156 busy |= mlx5e_poll_xdpsq_cq(&c->xdpsq.cq);
157
158 if (c->xdp)
159 busy |= mlx5e_poll_xdpsq_cq(&c->rq_xdpsq.cq);
160
161 if (likely(budget)) { /* budget=0 means: don't poll rx rings */
162 if (xsk_open)
163 work_done = mlx5e_poll_rx_cq(&xskrq->cq, budget);
164
165 if (likely(budget - work_done))
166 work_done += mlx5e_poll_rx_cq(&rq->cq, budget - work_done);
167
168 busy |= work_done == budget;
169 }
170
171 mlx5e_poll_ico_cq(&c->icosq.cq);
172 if (mlx5e_poll_ico_cq(&c->async_icosq.cq))
173 /* Don't clear the flag if nothing was polled to prevent
174 * queueing more WQEs and overflowing the async ICOSQ.
175 */
176 clear_bit(MLX5E_SQ_STATE_PENDING_XSK_TX, &c->async_icosq.state);
177
178 busy |= INDIRECT_CALL_2(rq->post_wqes,
179 mlx5e_post_rx_mpwqes,
180 mlx5e_post_rx_wqes,
181 rq);
182 if (xsk_open) {
183 busy |= mlx5e_poll_xdpsq_cq(&xsksq->cq);
184 busy_xsk |= mlx5e_napi_xsk_post(xsksq, xskrq);
185 }
186
187 busy |= busy_xsk;
188
189 if (busy) {
190 if (likely(mlx5e_channel_no_affinity_change(c))) {
191 work_done = budget;
192 goto out;
193 }
194 ch_stats->aff_change++;
195 aff_change = true;
196 if (budget && work_done == budget)
197 work_done--;
198 }
199
200 if (unlikely(!napi_complete_done(napi, work_done)))
201 goto out;
202
203 ch_stats->arm++;
204
205 for (i = 0; i < c->num_tc; i++) {
206 mlx5e_handle_tx_dim(&c->sq[i]);
207 mlx5e_cq_arm(&c->sq[i].cq);
208 }
209 if (unlikely(qos_sqs)) {
210 for (i = 0; i < qos_sqs_size; i++) {
211 struct mlx5e_txqsq *sq = rcu_dereference(qos_sqs[i]);
212
213 if (sq) {
214 mlx5e_handle_tx_dim(sq);
215 mlx5e_cq_arm(&sq->cq);
216 }
217 }
218 }
219
220 mlx5e_handle_rx_dim(rq);
221
222 mlx5e_cq_arm(&rq->cq);
223 mlx5e_cq_arm(&c->icosq.cq);
224 mlx5e_cq_arm(&c->async_icosq.cq);
225 mlx5e_cq_arm(&c->xdpsq.cq);
226
227 if (xsk_open) {
228 mlx5e_handle_rx_dim(xskrq);
229 mlx5e_cq_arm(&xsksq->cq);
230 mlx5e_cq_arm(&xskrq->cq);
231 }
232
233 if (unlikely(aff_change && busy_xsk)) {
234 mlx5e_trigger_irq(&c->icosq);
235 ch_stats->force_irq++;
236 }
237
238 out:
239 rcu_read_unlock();
240
241 return work_done;
242 }
243
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37905 bytes --]
prev parent reply other threads:[~2020-12-09 23:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-09 16:02 [PATCH net-next 0/4] HTB offload Maxim Mikityanskiy
2020-12-09 16:02 ` [PATCH net-next 1/4] net: sched: Add multi-queue support to sch_tree_lock Maxim Mikityanskiy
2020-12-09 16:02 ` [PATCH net-next 2/4] sch_htb: Hierarchical QoS hardware offload Maxim Mikityanskiy
2020-12-09 16:02 ` [PATCH net-next 3/4] sch_htb: Stats for offloaded HTB Maxim Mikityanskiy
2020-12-10 8:28 ` Dan Carpenter
2020-12-10 15:07 ` Maxim Mikityanskiy
2020-12-11 8:41 ` Dan Carpenter
2020-12-11 15:25 ` Maxim Mikityanskiy
2020-12-09 16:02 ` [PATCH net-next 4/4] net/mlx5e: Support HTB offload Maxim Mikityanskiy
2020-12-09 23:54 ` kernel 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=202012100734.bev99ZnD-lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=maximmi@mellanox.com \
--cc=maximmi@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=tariqt@mellanox.com \
--cc=xiyou.wangcong@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).