DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ilya V. Matveychikov" <matvejchikov@gmail.com>
To: dev@dpdk.org
Cc: "Ilya V. Matveychikov" <matvejchikov@gmail.com>, olivier.matz@6wind.com
Subject: [dpdk-dev] [PATCH] examples: fix for incomplete nb_segs type change
Date: Fri, 10 Nov 2017 16:57:25 +0300	[thread overview]
Message-ID: <20171110135725.24165-1-matvejchikov@gmail.com> (raw)
In-Reply-To: <B9C86047-BAC6-4006-8084-A436AA023965@gmail.com>

Fixes: 97cb466d65c9 ("mbuf: use 2 bytes for port and nb segments")
Cc: olivier.matz@6wind.com

Signed-off-by: Ilya V. Matveychikov <matvejchikov@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 fd1af0066..7a8e7ebce 100644
--- a/doc/guides/sample_app_ug/ipv4_multicast.rst
+++ b/doc/guides/sample_app_ug/ipv4_multicast.rst
@@ -339,7 +339,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 = 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 83ac0d808..1c5851654 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -289,7 +289,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 = pkt->nb_segs + 1;
 
 	/* copy metadata from source packet*/
 	hdr->port = pkt->port;
-- 
2.14.2

  parent reply	other threads:[~2017-11-10 13:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09 13:55 Ilya Matveychikov
2017-11-09 20:28 ` Ferruh Yigit
2017-11-10 13:57 ` Ilya V. Matveychikov [this message]
2017-11-12  2:55   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171110135725.24165-1-matvejchikov@gmail.com \
    --to=matvejchikov@gmail.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).