[dpdk-dev] [PATCH] examples: fix for incomplete nb_segs type change
Ilya Matveychikov
matvejchikov at gmail.com
Thu Nov 9 14:55:01 CET 2017
Fixes: 97cb466d ("mbuf: use 2 bytes for port and nb segments")
Signed-off-by: Ilya V. Matveychikov <matvejchikov at gmail.com>
---
doc/guides/sample_app_ug/ipv4_multicast.rst | 2 +-
examples/ipv4_multicast/main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/guides/sample_app_ug/ipv4_multicast.rst b/doc/guides/sample_app_ug/ipv4_multicast.rst
index 49712a0..9f50e32 100644
--- a/doc/guides/sample_app_ug/ipv4_multicast.rst
+++ b/doc/guides/sample_app_ug/ipv4_multicast.rst
@@ -364,7 +364,7 @@ It is the mcast_out_pkt() function that performs the packet duplication (either
/* update header's fields */
hdr->pkt.pkt_len = (uint16_t)(hdr->pkt.data_len + pkt->pkt.pkt_len);
- hdr->pkt.nb_segs = (uint8_t)(pkt->pkt.nb_segs + 1);
+ hdr->pkt.nb_segs = (uint16_t)(pkt->pkt.nb_segs + 1);
/* copy metadata from source packet */
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 9a13d35..1a82bc0 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -291,7 +291,7 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
/* update header's fields */
hdr->pkt_len = (uint16_t)(hdr->data_len + pkt->pkt_len);
- hdr->nb_segs = (uint8_t)(pkt->nb_segs + 1);
+ hdr->nb_segs = (uint16_t)(pkt->nb_segs + 1);
/* copy metadata from source packet*/
hdr->port = pkt->port;
--
2.7.4
More information about the dev
mailing list