[dpdk-stable] patch 'mbuf: explicit cast of size on detach' has been queued to stable release 18.02.2

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed May 23 14:09:27 CEST 2018


Hi,

FYI, your patch has been queued to stable release 18.02.2

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/25/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 92acd3e399352bef5b9b9fd503a40b4f2ccd529c Mon Sep 17 00:00:00 2001
From: Andy Green <andy at warmcat.com>
Date: Thu, 17 May 2018 21:50:22 +0800
Subject: [PATCH] mbuf: explicit cast of size on detach

[ upstream commit c779ebdca0e4765158bd1eaa6f65c9d714605fae ]

GCC 8.1 warned:

In function 'rte_pktmbuf_detach':
rte_mbuf.h:1580:14: warning: conversion from 'long unsigned int'
to 'uint32_t' {aka 'unsigned int'} may change value [-Wconversion]
  mbuf_size = sizeof(struct rte_mbuf) + priv_size;
              ^~~~~~

Fixes: 355e6735b335 ("mbuf: fix cloning with private mbuf data")

Signed-off-by: Andy Green <andy at warmcat.com>
---
 lib/librte_mbuf/rte_mbuf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index a66ac781c..f50607c8c 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1350,7 +1350,7 @@ static inline void rte_pktmbuf_detach(struct rte_mbuf *m)
 	uint32_t mbuf_size, buf_len, priv_size;
 
 	priv_size = rte_pktmbuf_priv_size(mp);
-	mbuf_size = sizeof(struct rte_mbuf) + priv_size;
+	mbuf_size = (uint32_t)(sizeof(struct rte_mbuf) + priv_size);
 	buf_len = rte_pktmbuf_data_room_size(mp);
 
 	m->priv_size = priv_size;
-- 
2.14.2



More information about the stable mailing list