examples/ipv4_multicast: fix segments number type

Fixes: 97cb466d65 ("mbuf: use 2 bytes for port and nb segments")

Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
This commit is contained in:
Ilya V. Matveychikov 2017-11-10 16:57:25 +03:00 committed by Thomas Monjalon
parent f046826e76
commit 4c20622a95
2 changed files with 2 additions and 2 deletions

View File

@ -339,7 +339,7 @@ It is the mcast_out_pkt() function that performs the packet duplication (either
/* update header's fields */ /* update header's fields */
hdr->pkt.pkt_len = (uint16_t)(hdr->pkt.data_len + pkt->pkt.pkt_len); 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 = pkt->pkt.nb_segs + 1;
/* copy metadata from source packet */ /* copy metadata from source packet */

View File

@ -289,7 +289,7 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone)
/* update header's fields */ /* update header's fields */
hdr->pkt_len = (uint16_t)(hdr->data_len + pkt->pkt_len); hdr->pkt_len = (uint16_t)(hdr->data_len + pkt->pkt_len);
hdr->nb_segs = (uint8_t)(pkt->nb_segs + 1); hdr->nb_segs = pkt->nb_segs + 1;
/* copy metadata from source packet*/ /* copy metadata from source packet*/
hdr->port = pkt->port; hdr->port = pkt->port;