From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1B230C27C53 for ; Fri, 7 Jun 2024 14:52:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PKi49ljYwOgAWyvcW3oZQWirRdidDx9ZBiPmRfyg5VY=; b=YTbf1nuK1KftE/ ns7sTmiCcK3uQzsKXlI2fbz9M2n329lYy1z7p+aKszXLfbGOZQlAtgBwb9IZynveIh6dIgrDOOKYz PDe1YzHcXnpbk37Iui2KCPCv4W8iet+GtLIvH3BpWDYqe+Owvy6XXZV5sT9kyT8XUi8R1G+UntmQT 3uM7r+Lxog1Ahy141rmACb5eHQ1aNrDINUum6gvDMj5OLWw+quiYDQiwvh9BI0Cp22wkcDTtkxx0Q wPWmBUttApZqSdw2hHYZJxz5IAQON5muDVufpqJQTO3Qz7YnxTbv3VjFaBrNsvZlgcMwVgH/VmDE9 PWpTIEeKT7LVwXq39YGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFaxG-0000000EWpV-0HJ5; Fri, 07 Jun 2024 14:52:34 +0000 Received: from mgamail.intel.com ([198.175.65.17]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFax9-0000000EWlB-2oCw for linux-arm-kernel@lists.infradead.org; Fri, 07 Jun 2024 14:52:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717771948; x=1749307948; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=OMgQGpWCIfcLB/7YN1u3KXCXoBIYpa43uuqf3QD8gsY=; b=NBinuzfvpICDOXywYrZAPaAaYnUIM1XQIOe3TaFNyZnA+mjKitS6aB1k WH//qnFXUeCt3tiB7vO5F/Xv4zMdz5u84zybHEHKsaJKgmkqk66S1gGZo cr+lViAskG1KWXV7GJ63X0WOlDTDSPfnNYahFi8iuwa1OsnfuZvOy6DMp YEUeQeeYEIlSs5ZQmqW98KjIeLAJdFhh3Zevmh/JssFsRjrHLMF6RmA8H Lca/bNQ2uWXqaAhF5k6cJKAN94o6LOmcN7fVt0Rak9sc0wR63Ud9z8CUS 0QvfutemHd4D7IF3ICx9D11sthQAcMtUf7nqh6XgmQMk2SotHysQbFKM+ g==; X-CSE-ConnectionGUID: zAt0glMGRjWFxm4/ixE8Jg== X-CSE-MsgGUID: hp2NddePRpWiDRtLjoJEZQ== X-IronPort-AV: E=McAfee;i="6600,9927,11096"; a="14614567" X-IronPort-AV: E=Sophos;i="6.08,221,1712646000"; d="scan'208";a="14614567" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2024 07:52:25 -0700 X-CSE-ConnectionGUID: +rbaR/4bRy+zZldqdbxGRQ== X-CSE-MsgGUID: BKBABKoMTk2MEMi3EGRRtw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,221,1712646000"; d="scan'208";a="75834739" Received: from lkp-server01.sh.intel.com (HELO 7b447d911354) ([10.239.97.150]) by orviesa001.jf.intel.com with ESMTP; 07 Jun 2024 07:52:21 -0700 Received: from kbuild by 7b447d911354 with local (Exim 4.96) (envelope-from ) id 1sFax0-00002y-1E; Fri, 07 Jun 2024 14:52:18 +0000 Date: Fri, 7 Jun 2024 22:52:00 +0800 From: kernel test robot To: Xiaolei Wang , olteanv@gmail.com, linux@armlinux.org.uk, andrew@lunn.ch, alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [net PATCH] net: stmmac: replace priv->speed with the portTransmitRate from the tc-cbs parameters Message-ID: <202406072254.05ysEMg1-lkp@intel.com> References: <20240607103327.438455-1-xiaolei.wang@windriver.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240607103327.438455-1-xiaolei.wang@windriver.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240607_075227_927466_1F5D92BB X-CRM114-Status: GOOD ( 12.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Xiaolei, kernel test robot noticed the following build warnings: [auto build test WARNING on net/main] url: https://github.com/intel-lab-lkp/linux/commits/Xiaolei-Wang/net-stmmac-replace-priv-speed-with-the-portTransmitRate-from-the-tc-cbs-parameters/20240607-183700 base: net/main patch link: https://lore.kernel.org/r/20240607103327.438455-1-xiaolei.wang%40windriver.com patch subject: [net PATCH] net: stmmac: replace priv->speed with the portTransmitRate from the tc-cbs parameters config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240607/202406072254.05ysEMg1-lkp@intel.com/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project d7d2d4f53fc79b4b58e8d8d08151b577c3699d4a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240607/202406072254.05ysEMg1-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 | Closes: https://lore.kernel.org/oe-kbuild-all/202406072254.05ysEMg1-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c:7: In file included from include/net/pkt_cls.h:7: In file included from include/net/sch_generic.h:5: In file included from include/linux/netdevice.h:38: In file included from include/net/net_namespace.h:43: In file included from include/linux/skbuff.h:17: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:8: In file included from include/linux/cacheflush.h:5: In file included from arch/riscv/include/asm/cacheflush.h:9: In file included from include/linux/mm.h:2253: include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ >> drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c:347:11: warning: unused variable 'speed_div' [-Wunused-variable] 347 | u32 ptr, speed_div; | ^~~~~~~~~ 2 warnings generated. vim +/speed_div +347 drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c 4dbbe8dde8485b Jose Abreu 2018-05-04 341 1f705bc61aee5f Jose Abreu 2018-06-27 342 static int tc_setup_cbs(struct stmmac_priv *priv, 1f705bc61aee5f Jose Abreu 2018-06-27 343 struct tc_cbs_qopt_offload *qopt) 1f705bc61aee5f Jose Abreu 2018-06-27 344 { 1f705bc61aee5f Jose Abreu 2018-06-27 345 u32 tx_queues_count = priv->plat->tx_queues_to_use; 1f705bc61aee5f Jose Abreu 2018-06-27 346 u32 queue = qopt->queue; 1f705bc61aee5f Jose Abreu 2018-06-27 @347 u32 ptr, speed_div; 1f705bc61aee5f Jose Abreu 2018-06-27 348 u32 mode_to_use; 1f705bc61aee5f Jose Abreu 2018-06-27 349 u64 value; 1f705bc61aee5f Jose Abreu 2018-06-27 350 int ret; 09685c7b815a3c Xiaolei Wang 2024-06-07 351 s64 port_transmit_rate_kbps; 1f705bc61aee5f Jose Abreu 2018-06-27 352 1f705bc61aee5f Jose Abreu 2018-06-27 353 /* Queue 0 is not AVB capable */ 1f705bc61aee5f Jose Abreu 2018-06-27 354 if (queue <= 0 || queue >= tx_queues_count) 1f705bc61aee5f Jose Abreu 2018-06-27 355 return -EINVAL; 0650d4017f4d2e Jose Abreu 2019-01-09 356 if (!priv->dma_cap.av) 0650d4017f4d2e Jose Abreu 2019-01-09 357 return -EOPNOTSUPP; 1f705bc61aee5f Jose Abreu 2018-06-27 358 09685c7b815a3c Xiaolei Wang 2024-06-07 359 port_transmit_rate_kbps = qopt->idleslope - qopt->sendslope; 09685c7b815a3c Xiaolei Wang 2024-06-07 360 24877687b375f2 Song, Yoong Siang 2021-02-18 361 /* Port Transmit Rate and Speed Divider */ 09685c7b815a3c Xiaolei Wang 2024-06-07 362 switch (div_s64(port_transmit_rate_kbps, 1000)) { 24877687b375f2 Song, Yoong Siang 2021-02-18 363 case SPEED_10000: 24877687b375f2 Song, Yoong Siang 2021-02-18 364 ptr = 32; 24877687b375f2 Song, Yoong Siang 2021-02-18 365 break; 24877687b375f2 Song, Yoong Siang 2021-02-18 366 case SPEED_5000: 24877687b375f2 Song, Yoong Siang 2021-02-18 367 ptr = 32; 24877687b375f2 Song, Yoong Siang 2021-02-18 368 break; 24877687b375f2 Song, Yoong Siang 2021-02-18 369 case SPEED_2500: 24877687b375f2 Song, Yoong Siang 2021-02-18 370 ptr = 8; 24877687b375f2 Song, Yoong Siang 2021-02-18 371 break; 24877687b375f2 Song, Yoong Siang 2021-02-18 372 case SPEED_1000: 24877687b375f2 Song, Yoong Siang 2021-02-18 373 ptr = 8; 24877687b375f2 Song, Yoong Siang 2021-02-18 374 break; 24877687b375f2 Song, Yoong Siang 2021-02-18 375 case SPEED_100: 24877687b375f2 Song, Yoong Siang 2021-02-18 376 ptr = 4; 24877687b375f2 Song, Yoong Siang 2021-02-18 377 break; 24877687b375f2 Song, Yoong Siang 2021-02-18 378 default: 24877687b375f2 Song, Yoong Siang 2021-02-18 379 return -EOPNOTSUPP; 24877687b375f2 Song, Yoong Siang 2021-02-18 380 } 24877687b375f2 Song, Yoong Siang 2021-02-18 381 1f705bc61aee5f Jose Abreu 2018-06-27 382 mode_to_use = priv->plat->tx_queues_cfg[queue].mode_to_use; 1f705bc61aee5f Jose Abreu 2018-06-27 383 if (mode_to_use == MTL_QUEUE_DCB && qopt->enable) { 1f705bc61aee5f Jose Abreu 2018-06-27 384 ret = stmmac_dma_qmode(priv, priv->ioaddr, queue, MTL_QUEUE_AVB); 1f705bc61aee5f Jose Abreu 2018-06-27 385 if (ret) 1f705bc61aee5f Jose Abreu 2018-06-27 386 return ret; 1f705bc61aee5f Jose Abreu 2018-06-27 387 1f705bc61aee5f Jose Abreu 2018-06-27 388 priv->plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_AVB; 1f705bc61aee5f Jose Abreu 2018-06-27 389 } else if (!qopt->enable) { f317e2ea8c8873 Mohammad Athari Bin Ismail 2021-02-04 390 ret = stmmac_dma_qmode(priv, priv->ioaddr, queue, f317e2ea8c8873 Mohammad Athari Bin Ismail 2021-02-04 391 MTL_QUEUE_DCB); f317e2ea8c8873 Mohammad Athari Bin Ismail 2021-02-04 392 if (ret) f317e2ea8c8873 Mohammad Athari Bin Ismail 2021-02-04 393 return ret; f317e2ea8c8873 Mohammad Athari Bin Ismail 2021-02-04 394 f317e2ea8c8873 Mohammad Athari Bin Ismail 2021-02-04 395 priv->plat->tx_queues_cfg[queue].mode_to_use = MTL_QUEUE_DCB; 1f705bc61aee5f Jose Abreu 2018-06-27 396 } 1f705bc61aee5f Jose Abreu 2018-06-27 397 09685c7b815a3c Xiaolei Wang 2024-06-07 398 port_transmit_rate_kbps = qopt->idleslope - qopt->sendslope; 09685c7b815a3c Xiaolei Wang 2024-06-07 399 1f705bc61aee5f Jose Abreu 2018-06-27 400 /* Final adjustments for HW */ 09685c7b815a3c Xiaolei Wang 2024-06-07 401 value = div_s64(qopt->idleslope * 1024ll * ptr, port_transmit_rate_kbps); 1f705bc61aee5f Jose Abreu 2018-06-27 402 priv->plat->tx_queues_cfg[queue].idle_slope = value & GENMASK(31, 0); 1f705bc61aee5f Jose Abreu 2018-06-27 403 09685c7b815a3c Xiaolei Wang 2024-06-07 404 value = div_s64(-qopt->sendslope * 1024ll * ptr, port_transmit_rate_kbps); 1f705bc61aee5f Jose Abreu 2018-06-27 405 priv->plat->tx_queues_cfg[queue].send_slope = value & GENMASK(31, 0); 1f705bc61aee5f Jose Abreu 2018-06-27 406 8f704ef666406f Arnd Bergmann 2018-07-06 407 value = qopt->hicredit * 1024ll * 8; 1f705bc61aee5f Jose Abreu 2018-06-27 408 priv->plat->tx_queues_cfg[queue].high_credit = value & GENMASK(31, 0); 1f705bc61aee5f Jose Abreu 2018-06-27 409 8f704ef666406f Arnd Bergmann 2018-07-06 410 value = qopt->locredit * 1024ll * 8; 1f705bc61aee5f Jose Abreu 2018-06-27 411 priv->plat->tx_queues_cfg[queue].low_credit = value & GENMASK(31, 0); 1f705bc61aee5f Jose Abreu 2018-06-27 412 1f705bc61aee5f Jose Abreu 2018-06-27 413 ret = stmmac_config_cbs(priv, priv->hw, 1f705bc61aee5f Jose Abreu 2018-06-27 414 priv->plat->tx_queues_cfg[queue].send_slope, 1f705bc61aee5f Jose Abreu 2018-06-27 415 priv->plat->tx_queues_cfg[queue].idle_slope, 1f705bc61aee5f Jose Abreu 2018-06-27 416 priv->plat->tx_queues_cfg[queue].high_credit, 1f705bc61aee5f Jose Abreu 2018-06-27 417 priv->plat->tx_queues_cfg[queue].low_credit, 1f705bc61aee5f Jose Abreu 2018-06-27 418 queue); 1f705bc61aee5f Jose Abreu 2018-06-27 419 if (ret) 1f705bc61aee5f Jose Abreu 2018-06-27 420 return ret; 1f705bc61aee5f Jose Abreu 2018-06-27 421 1f705bc61aee5f Jose Abreu 2018-06-27 422 dev_info(priv->device, "CBS queue %d: send %d, idle %d, hi %d, lo %d\n", 1f705bc61aee5f Jose Abreu 2018-06-27 423 queue, qopt->sendslope, qopt->idleslope, 1f705bc61aee5f Jose Abreu 2018-06-27 424 qopt->hicredit, qopt->locredit); 1f705bc61aee5f Jose Abreu 2018-06-27 425 return 0; 1f705bc61aee5f Jose Abreu 2018-06-27 426 } 1f705bc61aee5f Jose Abreu 2018-06-27 427 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel