net/ice: fix unmatched integer type

Message ID 20210707095110.1508-1-ting.xu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series net/ice: fix unmatched integer type |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/github-robot success github build: passed
ci/Intel-compilation warning apply issues
ci/iol-testing warning apply patch failure

Commit Message

Xu, Ting July 7, 2021, 9:51 a.m. UTC
  This patch fixed the unmatched interger type issue in the comparison,
which causing compilation failure on RHEL.

Fixes: 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in DCF")
Cc: stable@dpdk.org

Signed-off-by: Ting Xu <ting.xu@intel.com>
---
 drivers/net/ice/ice_dcf_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ali Alnubani July 7, 2021, 10:36 a.m. UTC | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Ting Xu
> Sent: Wednesday, July 7, 2021 12:51 PM
> To: dev@dpdk.org
> Cc: qi.z.zhang@intel.com; jingjing.wu@intel.com; beilei.xing@intel.com;
> NBU-Contact-Thomas Monjalon <thomas@monjalon.net>; Ting Xu
> <ting.xu@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/ice: fix unmatched integer type
> 
> This patch fixed the unmatched interger type issue in the comparison, which
> causing compilation failure on RHEL.
> 
> Fixes: 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in DCF")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ting Xu <ting.xu@intel.com>
> ---

Tested-by: Ali Alnubani <alialnu@nvidia.com>

Thanks,
Ali
  
Thomas Monjalon July 7, 2021, 11:29 a.m. UTC | #2
07/07/2021 12:36, Ali Alnubani:
> From: Ting Xu
> > This patch fixed the unmatched interger type issue in the comparison, which
> > causing compilation failure on RHEL.
> > 
> > Fixes: 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in DCF")
> > Cc: stable@dpdk.org

No need of Cc stable because the issue is only in the current branch.

> > Signed-off-by: Ting Xu <ting.xu@intel.com>
> 
> Tested-by: Ali Alnubani <alialnu@nvidia.com>

Applied with failure message, thanks.

https://git.dpdk.org/dpdk/commit/?id=83fa21405
  
Qi Zhang July 7, 2021, 11:31 a.m. UTC | #3
> -----Original Message-----
> From: Ali Alnubani <alialnu@nvidia.com>
> Sent: Wednesday, July 7, 2021 6:36 PM
> To: Xu, Ting <ting.xu@intel.com>; dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Xing, Beilei <beilei.xing@intel.com>; NBU-Contact-Thomas Monjalon
> <thomas@monjalon.net>; stable@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH] net/ice: fix unmatched integer type
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Ting Xu
> > Sent: Wednesday, July 7, 2021 12:51 PM
> > To: dev@dpdk.org
> > Cc: qi.z.zhang@intel.com; jingjing.wu@intel.com;
> > beilei.xing@intel.com; NBU-Contact-Thomas Monjalon
> > <thomas@monjalon.net>; Ting Xu <ting.xu@intel.com>; stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH] net/ice: fix unmatched integer type
> >
> > This patch fixed the unmatched interger type issue in the comparison,
> > which causing compilation failure on RHEL.
> >
> > Fixes: 3a6bfc37eaf4 ("net/ice: support QoS config VF bandwidth in
> > DCF")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ting Xu <ting.xu@intel.com>
> > ---
> 
> Tested-by: Ali Alnubani <alialnu@nvidia.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
> 
> Thanks,
> Ali
  

Patch

diff --git a/drivers/net/ice/ice_dcf_sched.c b/drivers/net/ice/ice_dcf_sched.c
index 4371bbc820..aeb1afbe85 100644
--- a/drivers/net/ice/ice_dcf_sched.c
+++ b/drivers/net/ice/ice_dcf_sched.c
@@ -350,7 +350,7 @@  ice_dcf_node_add(struct rte_eth_dev *dev, uint32_t node_id,
 			return -EINVAL;
 		}
 		/* check the vsi node id */
-		if (node_id > tc_nb * hw->num_vfs) {
+		if (node_id > (uint32_t)(tc_nb * hw->num_vfs)) {
 			error->type = RTE_TM_ERROR_TYPE_NODE_ID;
 			error->message = "too large VSI id";
 			return -EINVAL;