[dpdk-stable] patch 'eal: explicit cast of core id when getting index' has been queued to LTS release 16.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 15 19:19:03 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 16.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/16/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 80b52aa3887a8ed542aca1293cb5fb5057a71026 Mon Sep 17 00:00:00 2001
From: Andy Green <andy at warmcat.com>
Date: Sat, 12 May 2018 09:59:07 +0800
Subject: [PATCH] eal: explicit cast of core id when getting index

[ upstream commit ef3c7b50ff39a37a93ecea47481d392d8fcb2936 ]

rte_lcore.h: In function 'rte_lcore_index':
rte_lcore.h:122:14:
warning: conversion to 'int' from 'unsigned int' may change
the sign of the result [-Wsign-conversion]
   lcore_id = rte_lcore_id();

Fixes: 5583037a7950 ("eal: get relative core index")

Signed-off-by: Andy Green <andy at warmcat.com>
Reviewed-by: Stephen Hemminger <stephen at networkplumber.org>
---
 lib/librte_eal/common/include/rte_lcore.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h
index fe7b5865f..da48a94a6 100644
--- a/lib/librte_eal/common/include/rte_lcore.h
+++ b/lib/librte_eal/common/include/rte_lcore.h
@@ -134,7 +134,7 @@ rte_lcore_index(int lcore_id)
 	if (lcore_id >= RTE_MAX_LCORE)
 		return -1;
 	if (lcore_id < 0)
-		lcore_id = rte_lcore_id();
+		lcore_id = (int)rte_lcore_id();
 	return lcore_config[lcore_id].core_index;
 }
 
-- 
2.14.2



More information about the stable mailing list