From: kbuild test robot <lkp@intel.com>
To: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: kbuild-all@01.org, netdev@vger.kernel.org,
Jose Abreu <Jose.Abreu@synopsys.com>,
"David S. Miller" <davem@davemloft.net>,
Joao Pinto <Joao.Pinto@synopsys.com>,
Vitor Soares <Vitor.Soares@synopsys.com>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@st.com>
Subject: Re: [PATCH net-next] net: stmmac: Add support for CBS QDISC
Date: Wed, 27 Jun 2018 22:15:06 +0800 [thread overview]
Message-ID: <201806272221.VPR2vJhr%fengguang.wu@intel.com> (raw)
In-Reply-To: <daa3124702201f0d1c30da51f2a90cf432e39ba3.1530103308.git.joabreu@synopsys.com>
[-- Attachment #1: Type: text/plain, Size: 4313 bytes --]
Hi Jose,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Jose-Abreu/net-stmmac-Add-support-for-CBS-QDISC/20180627-214704
config: sh-allyesconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=sh
All warnings (new ones prefixed by >>):
In file included from ./arch/sh/include/generated/asm/div64.h:1:0,
from include/linux/kernel.h:174,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/workqueue.h:9,
from include/net/pkt_cls.h:6,
from drivers/net//ethernet/stmicro/stmmac/stmmac_tc.c:7:
drivers/net//ethernet/stmicro/stmmac/stmmac_tc.c: In function 'tc_setup_cbs':
include/asm-generic/div64.h:222:28: warning: comparison of distinct pointer types lacks a cast
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
^
>> drivers/net//ethernet/stmicro/stmmac/stmmac_tc.c:325:2: note: in expansion of macro 'do_div'
do_div(value, speed_div);
^~~~~~
include/asm-generic/div64.h:222:28: warning: comparison of distinct pointer types lacks a cast
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
^
drivers/net//ethernet/stmicro/stmmac/stmmac_tc.c:329:2: note: in expansion of macro 'do_div'
do_div(value, speed_div);
^~~~~~
vim +/do_div +325 drivers/net//ethernet/stmicro/stmmac/stmmac_tc.c
291
292 static int tc_setup_cbs(struct stmmac_priv *priv,
293 struct tc_cbs_qopt_offload *qopt)
294 {
295 u32 tx_queues_count = priv->plat->tx_queues_to_use;
296 u32 queue = qopt->queue;
297 u32 ptr, speed_div;
298 u32 mode_to_use;
299 s64 value;
300 int ret;
301
302 /* Queue 0 is not AVB capable */
303 if (queue <= 0 || queue >= tx_queues_count)
304 return -EINVAL;
305 if (priv->speed != SPEED_100 && priv->speed != SPEED_1000)
306 return -EOPNOTSUPP;
307
308 mode_to_use = priv->plat->tx_queues_cfg[queue].mode_to_use;
309 if (mode_to_use == MTL_QUEUE_DCB && qopt->enable) {
310 ret = stmmac_dma_qmode(priv, priv->ioaddr, queue, MTL_QUEUE_AVB);
311 if (ret)
312 return ret;
313
314 priv->plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_AVB;
315 } else if (!qopt->enable) {
316 return stmmac_dma_qmode(priv, priv->ioaddr, queue, MTL_QUEUE_DCB);
317 }
318
319 /* Port Transmit Rate and Speed Divider */
320 ptr = (priv->speed == SPEED_100) ? 4 : 8;
321 speed_div = (priv->speed == SPEED_100) ? 100000 : 1000000;
322
323 /* Final adjustments for HW */
324 value = qopt->idleslope * 1024 * ptr;
> 325 do_div(value, speed_div);
326 priv->plat->tx_queues_cfg[queue].idle_slope = value & GENMASK(31, 0);
327
328 value = -qopt->sendslope * 1024UL * ptr;
329 do_div(value, speed_div);
330 priv->plat->tx_queues_cfg[queue].send_slope = value & GENMASK(31, 0);
331
332 value = qopt->hicredit * 1024 * 8;
333 priv->plat->tx_queues_cfg[queue].high_credit = value & GENMASK(31, 0);
334
335 value = qopt->locredit * 1024 * 8;
336 priv->plat->tx_queues_cfg[queue].low_credit = value & GENMASK(31, 0);
337
338 ret = stmmac_config_cbs(priv, priv->hw,
339 priv->plat->tx_queues_cfg[queue].send_slope,
340 priv->plat->tx_queues_cfg[queue].idle_slope,
341 priv->plat->tx_queues_cfg[queue].high_credit,
342 priv->plat->tx_queues_cfg[queue].low_credit,
343 queue);
344 if (ret)
345 return ret;
346
347 dev_info(priv->device, "CBS queue %d: send %d, idle %d, hi %d, lo %d\n",
348 queue, qopt->sendslope, qopt->idleslope,
349 qopt->hicredit, qopt->locredit);
350 return 0;
351 }
352
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 48915 bytes --]
next prev parent reply other threads:[~2018-06-27 14:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 12:43 [PATCH net-next] net: stmmac: Add support for CBS QDISC Jose Abreu
2018-06-27 14:15 ` kbuild test robot [this message]
2018-06-27 14:32 ` Jose Abreu
2018-06-27 14:36 ` Jose Abreu
2018-06-27 14:36 ` Geert Uytterhoeven
2018-06-27 14:44 ` Jose Abreu
2018-06-27 14:51 ` Geert Uytterhoeven
2018-06-30 9:39 ` David Miller
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=201806272221.VPR2vJhr%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=Joao.Pinto@synopsys.com \
--cc=Jose.Abreu@synopsys.com \
--cc=Vitor.Soares@synopsys.com \
--cc=alexandre.torgue@st.com \
--cc=davem@davemloft.net \
--cc=kbuild-all@01.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.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