summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/librte_eal/common/include/rte_version.h4
-rw-r--r--lib/librte_mbuf/rte_mbuf.c4
-rw-r--r--lib/librte_mbuf/rte_mbuf.h11
-rw-r--r--lib/librte_pdump/rte_pdump.c6
4 files changed, 14 insertions, 11 deletions
diff --git a/lib/librte_eal/common/include/rte_version.h b/lib/librte_eal/common/include/rte_version.h
index fa018074..b176f658 100644
--- a/lib/librte_eal/common/include/rte_version.h
+++ b/lib/librte_eal/common/include/rte_version.h
@@ -71,14 +71,14 @@ extern "C" {
/**
* Extra string to be appended to version number
*/
-#define RTE_VER_SUFFIX "-rc"
+#define RTE_VER_SUFFIX ""
/**
* Patch release number
* 0-15 = release candidates
* 16 = release
*/
-#define RTE_VER_RELEASE 4
+#define RTE_VER_RELEASE 16
/**
* Macro to compute a version number usable for comparisons
diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index 2e08b9e9..7543662f 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -203,7 +203,7 @@ void
rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header)
{
const struct rte_mbuf *m_seg;
- unsigned nb_segs;
+ unsigned int nb_segs;
if (m == NULL)
rte_panic("mbuf is NULL\n");
@@ -239,7 +239,7 @@ void
rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
{
unsigned int len;
- unsigned nb_segs;
+ unsigned int nb_segs;
__rte_mbuf_sanity_check(m, 1);
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 7e326bbc..ce8a05dd 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -584,6 +584,9 @@ struct rte_mbuf {
} __rte_cache_aligned;
+/**< Maximum number of nb_segs allowed. */
+#define RTE_MBUF_MAX_NB_SEGS UINT16_MAX
+
/**
* Prefetch the first part of the mbuf
*
@@ -1447,7 +1450,7 @@ static inline struct rte_mbuf *rte_pktmbuf_clone(struct rte_mbuf *md,
{
struct rte_mbuf *mc, *mi, **prev;
uint32_t pktlen;
- uint8_t nseg;
+ uint16_t nseg;
if (unlikely ((mc = rte_pktmbuf_alloc(mp)) == NULL))
return NULL;
@@ -1807,14 +1810,14 @@ static inline const void *rte_pktmbuf_read(const struct rte_mbuf *m,
*
* @return
* - 0, on success.
- * - -EOVERFLOW, if the chain is full (256 entries)
+ * - -EOVERFLOW, if the chain segment limit exceeded
*/
static inline int rte_pktmbuf_chain(struct rte_mbuf *head, struct rte_mbuf *tail)
{
struct rte_mbuf *cur_tail;
/* Check for number-of-segments-overflow */
- if (head->nb_segs + tail->nb_segs >= 1 << (sizeof(head->nb_segs) * 8))
+ if (head->nb_segs + tail->nb_segs > RTE_MBUF_MAX_NB_SEGS)
return -EOVERFLOW;
/* Chain 'tail' onto the old tail */
@@ -1822,7 +1825,7 @@ static inline int rte_pktmbuf_chain(struct rte_mbuf *head, struct rte_mbuf *tail
cur_tail->next = tail;
/* accumulate number of segments and total length. */
- head->nb_segs = (uint8_t)(head->nb_segs + tail->nb_segs);
+ head->nb_segs += tail->nb_segs;
head->pkt_len += tail->pkt_len;
/* pkt_len is only set in the head */
diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c
index 29a6c99b..bc18f814 100644
--- a/lib/librte_pdump/rte_pdump.c
+++ b/lib/librte_pdump/rte_pdump.c
@@ -139,7 +139,7 @@ pdump_pktmbuf_copy(struct rte_mbuf *m, struct rte_mempool *mp)
{
struct rte_mbuf *m_dup, *seg, **prev;
uint32_t pktlen;
- uint8_t nseg;
+ uint16_t nseg;
m_dup = rte_pktmbuf_alloc(mp);
if (unlikely(m_dup == NULL))
@@ -353,7 +353,7 @@ set_pdump_rxtx_cbs(struct pdump_request *p)
&port);
if (ret < 0) {
RTE_LOG(ERR, PDUMP,
- "failed to get potid for device id=%s\n",
+ "failed to get port id for device id=%s\n",
p->data.en_v1.device);
return -EINVAL;
}
@@ -365,7 +365,7 @@ set_pdump_rxtx_cbs(struct pdump_request *p)
&port);
if (ret < 0) {
RTE_LOG(ERR, PDUMP,
- "failed to get potid for device id=%s\n",
+ "failed to get port id for device id=%s\n",
p->data.dis_v1.device);
return -EINVAL;
}