* [dpdk-dev] [PATCH] examples: fix for incomplete nb_segs type change
@ 2017-11-09 13:55 Ilya Matveychikov
2017-11-09 20:28 ` Ferruh Yigit
2017-11-10 13:57 ` Ilya V. Matveychikov
0 siblings, 2 replies; 4+ messages in thread
From: Ilya Matveychikov @ 2017-11-09 13:55 UTC (permalink / raw)
To: dev
Fixes: 97cb466d ("mbuf: use 2 bytes for port and nb segments")
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 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] examples: fix for incomplete nb_segs type change
2017-11-09 13:55 [dpdk-dev] [PATCH] examples: fix for incomplete nb_segs type change Ilya Matveychikov
@ 2017-11-09 20:28 ` Ferruh Yigit
2017-11-10 13:57 ` Ilya V. Matveychikov
1 sibling, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2017-11-09 20:28 UTC (permalink / raw)
To: Ilya Matveychikov, dev
On 11/9/2017 5:55 AM, Ilya Matveychikov wrote:
> Fixes: 97cb466d ("mbuf: use 2 bytes for port and nb segments")
Fixline format we are using is slightly different, there is an alias to use:
http://dpdk.org/doc/guides/contributing/patches.html
git config alias.fixline "log -1 --abbrev=12 --format='Fixes: %h (\"%s\")%nCc: %ae'"
> 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 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);
This is the side effect of putting code into document, code changes...
>
> /* 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);
Do we need the cast at all?
>
> /* copy metadata from source packet*/
> hdr->port = pkt->port;
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH] examples: fix for incomplete nb_segs type change
2017-11-09 13:55 [dpdk-dev] [PATCH] examples: fix for incomplete nb_segs type change Ilya Matveychikov
2017-11-09 20:28 ` Ferruh Yigit
@ 2017-11-10 13:57 ` Ilya V. Matveychikov
2017-11-12 2:55 ` Thomas Monjalon
1 sibling, 1 reply; 4+ messages in thread
From: Ilya V. Matveychikov @ 2017-11-10 13:57 UTC (permalink / raw)
To: dev; +Cc: Ilya V. Matveychikov, olivier.matz
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] examples: fix for incomplete nb_segs type change
2017-11-10 13:57 ` Ilya V. Matveychikov
@ 2017-11-12 2:55 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2017-11-12 2:55 UTC (permalink / raw)
To: Ilya V. Matveychikov; +Cc: dev, olivier.matz
10/11/2017 14:57, Ilya V. Matveychikov:
> 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>
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-12 2:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09 13:55 [dpdk-dev] [PATCH] examples: fix for incomplete nb_segs type change Ilya Matveychikov
2017-11-09 20:28 ` Ferruh Yigit
2017-11-10 13:57 ` Ilya V. Matveychikov
2017-11-12 2:55 ` Thomas Monjalon
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).