[dpdk-dev] [PATCH] mbuf: fix for incomplete nb_segs/port types change
Stephen Hemminger
stephen at networkplumber.org
Fri Nov 10 00:26:02 CET 2017
On Thu, 9 Nov 2017 17:51:41 +0400
Ilya Matveychikov <matvejchikov at gmail.com> wrote:
> Update types of variables to correspond to nb_segs type change from
> uint8_t to uint16_t. Also, use 0xffff instead of 0xff to specify
> invalid port value.
>
> Fixes: 97cb466d ("mbuf: use 2 bytes for port and nb segments")
> Signed-off-by: Ilya V. Matveychikov <matvejchikov at gmail.com>
> ---
> lib/librte_mbuf/rte_mbuf.c | 6 +++---
> lib/librte_mbuf/rte_mbuf.h | 13 ++++++++-----
> lib/librte_pdump/rte_pdump.c | 2 +-
> 3 files changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
> index 26a62b8..f2213a4 100644
> --- a/lib/librte_mbuf/rte_mbuf.c
> +++ b/lib/librte_mbuf/rte_mbuf.c
> @@ -144,7 +144,7 @@ rte_pktmbuf_init(struct rte_mempool *mp,
> /* init some constant fields */
> m->pool = mp;
> m->nb_segs = 1;
> - m->port = 0xff;
> + m->port = 0xffff;
In current code this now uses MBUF_INVALID_PORT here
More information about the dev
mailing list