[dpdk-dev] [PATCH v2] mbuf: check sanity of data_len and pkt_len as well

2017-12-09 Thread Ilya V. Matveychikov
Update rte_mbuf_sanity_check() to check sanity of data_len and pkt_len fields. For segmented packets it is supposed that head's pkt_len field should be the sum of all segments data_len values. Signed-off-by: Ilya V. Matveychikov --- lib/librte_mbuf/rte_mbuf.c | 23 +++--

[dpdk-dev] [PATCH v2] mbuf: cleanup rte_pktmbuf_lastseg function

2017-12-09 Thread Ilya V. Matveychikov
There is no reason to have local variable m2. Fixes: af75078fece3 ("first public release") Signed-off-by: Ilya V. Matveychikov --- lib/librte_mbuf/rte_mbuf.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mb

[dpdk-dev] [PATCH] examples: fix for incomplete nb_segs type change

2017-11-10 Thread Ilya V. Matveychikov
Fixes: 97cb466d65c9 ("mbuf: use 2 bytes for port and nb segments") Cc: olivier.m...@6wind.com Signed-off-by: Ilya V. Matveychikov --- doc/guides/sample_app_ug/ipv4_multicast.rst | 2 +- examples/ipv4_multicast/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletion

[dpdk-dev] [PATCH] mbuf: fix for incomplete nb_segs types change

2017-11-10 Thread Ilya V. Matveychikov
Update types of variables to correspond to nb_segs type change from uint8_t to uint16_t. Fixes: 97cb466d65c9 ("mbuf: use 2 bytes for port and nb segments") Cc: olivier.m...@6wind.com Signed-off-by: Ilya V. Matveychikov --- lib/librte_mbuf/rte_mbuf.c | 4 ++-- lib/librte_mbuf/

[dpdk-dev] [PATCH] pdump: fix possible mbuf leak

2017-11-10 Thread Ilya V. Matveychikov
If pdump_pktmbuf_copy_data() fails it's possible to have segment leak as rte_pktmbuf_free() only handles m_dup chain but not the seg just allocated and yet not chained. Fixes: 278f945402c5 ("pdump: add new library for packet capture") Cc: reshma.pat...@intel.com Signed

[dpdk-dev] [PATCH 1/4] pdump: fix possible mbuf leak

2017-11-10 Thread Ilya V. Matveychikov
If pdump_pktmbuf_copy_data() fails it's possible to have segment leak as rte_pktmbuf_free() only handles m_dup chain but not the seg just allocated and yet not chained. Fixes: 278f9454 ("pdump: add new library for packet capture") Signed-off-by: Ilya V. Matveychikov --- l