DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/test: fix IPv6 header initialization
@ 2021-03-26 16:37 Lance Richardson
  2021-05-11 14:31 ` [dpdk-dev] [dpdk-stable] " David Marchand
  2021-07-05  8:22 ` David Marchand
  0 siblings, 2 replies; 6+ messages in thread
From: Lance Richardson @ 2021-03-26 16:37 UTC (permalink / raw)
  To: Declan Doherty, Pablo de Lara; +Cc: dev, stable

[-- Attachment #1: Type: text/plain, Size: 1335 bytes --]

Fix two issues found when writing PMD unit tests for HW ptype and
L4 checksum offload:

   - The version field in the IPv6 header was being set to zero,
     which prevented hardware from recognizing it as IPv6. The
     IP version field is now set to six.
   - The payload_len field was being initialized using host byte
     order, which (among other things) resulted in incorrect L4
     checksum computation. The payload_len field is now set using
     network (big-endian) byte order.

Fixes: 92073ef961ee ("bond: unit tests")
Cc: stable@dpdk.org

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
---
 app/test/packet_burst_generator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index f203f9d09e..8b390853a2 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -141,8 +141,8 @@ uint16_t
 initialize_ipv6_header(struct rte_ipv6_hdr *ip_hdr, uint8_t *src_addr,
 		uint8_t *dst_addr, uint16_t pkt_data_len)
 {
-	ip_hdr->vtc_flow = 0;
-	ip_hdr->payload_len = pkt_data_len;
+	ip_hdr->vtc_flow = rte_cpu_to_be_32(0x60000000); /* Set version to 6. */
+	ip_hdr->payload_len = rte_cpu_to_be_16(pkt_data_len);
 	ip_hdr->proto = IPPROTO_UDP;
 	ip_hdr->hop_limits = IP_DEFTTL;
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] app/test: fix IPv6 header initialization
  2021-03-26 16:37 [dpdk-dev] [PATCH] app/test: fix IPv6 header initialization Lance Richardson
@ 2021-05-11 14:31 ` David Marchand
  2021-05-11 14:42   ` Lance Richardson
  2021-07-05  8:22 ` David Marchand
  1 sibling, 1 reply; 6+ messages in thread
From: David Marchand @ 2021-05-11 14:31 UTC (permalink / raw)
  To: Declan Doherty, Pablo de Lara, Chas Williams, humin (Q)
  Cc: dev, dpdk stable, Lance Richardson

On Fri, Mar 26, 2021 at 5:37 PM Lance Richardson
<lance.richardson@broadcom.com> wrote:
>
> Fix two issues found when writing PMD unit tests for HW ptype and
> L4 checksum offload:

Would those unit tests be interesting to other pmd driver writers?


>
>    - The version field in the IPv6 header was being set to zero,
>      which prevented hardware from recognizing it as IPv6. The
>      IP version field is now set to six.
>    - The payload_len field was being initialized using host byte
>      order, which (among other things) resulted in incorrect L4
>      checksum computation. The payload_len field is now set using
>      network (big-endian) byte order.
>
> Fixes: 92073ef961ee ("bond: unit tests")

Odd that this never got caught before, I guess nobody ran the bonding
test with ipv6.

Adding new maintainers for the bonding code since this helper is only
used in the bonding ut.
Should we take this in 21.05 or wait 21.08?


> Cc: stable@dpdk.org
>
> Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>

Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] app/test: fix IPv6 header initialization
  2021-05-11 14:31 ` [dpdk-dev] [dpdk-stable] " David Marchand
@ 2021-05-11 14:42   ` Lance Richardson
  2021-06-21 12:40     ` Lance Richardson
  0 siblings, 1 reply; 6+ messages in thread
From: Lance Richardson @ 2021-05-11 14:42 UTC (permalink / raw)
  To: David Marchand
  Cc: Declan Doherty, Pablo de Lara, Chas Williams, humin (Q),
	dev, dpdk stable

[-- Attachment #1: Type: text/plain, Size: 589 bytes --]

On Tue, May 11, 2021 at 10:31 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Fri, Mar 26, 2021 at 5:37 PM Lance Richardson
> <lance.richardson@broadcom.com> wrote:
> >
> > Fix two issues found when writing PMD unit tests for HW ptype and
> > L4 checksum offload:
>
> Would those unit tests be interesting to other pmd driver writers?
>
I think so, although some adjustments would be needed to account
for differences in hardware capabilities. The tests I've written so far
are still very much a work in progress, but I hope to have something
ready for RFC in the near future.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] app/test: fix IPv6 header initialization
  2021-05-11 14:42   ` Lance Richardson
@ 2021-06-21 12:40     ` Lance Richardson
  2021-06-21 12:49       ` David Marchand
  0 siblings, 1 reply; 6+ messages in thread
From: Lance Richardson @ 2021-06-21 12:40 UTC (permalink / raw)
  To: David Marchand
  Cc: Declan Doherty, Pablo de Lara, Chas Williams, humin (Q),
	dev, dpdk stable

[-- Attachment #1: Type: text/plain, Size: 773 bytes --]

On Tue, May 11, 2021 at 10:42 AM Lance Richardson
<lance.richardson@broadcom.com> wrote:
>
> On Tue, May 11, 2021 at 10:31 AM David Marchand
> <david.marchand@redhat.com> wrote:
> >
> > On Fri, Mar 26, 2021 at 5:37 PM Lance Richardson
> > <lance.richardson@broadcom.com> wrote:
> > >
> > > Fix two issues found when writing PMD unit tests for HW ptype and
> > > L4 checksum offload:
> >
> > Would those unit tests be interesting to other pmd driver writers?
> >
> I think so, although some adjustments would be needed to account
> for differences in hardware capabilities. The tests I've written so far
> are still very much a work in progress, but I hope to have something
> ready for RFC in the near future.

What is the current status of this patch?

Thanks,
     Lance

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] app/test: fix IPv6 header initialization
  2021-06-21 12:40     ` Lance Richardson
@ 2021-06-21 12:49       ` David Marchand
  0 siblings, 0 replies; 6+ messages in thread
From: David Marchand @ 2021-06-21 12:49 UTC (permalink / raw)
  To: Lance Richardson
  Cc: Declan Doherty, Pablo de Lara, Chas Williams, humin (Q),
	dev, dpdk stable

On Mon, Jun 21, 2021 at 2:41 PM Lance Richardson
<lance.richardson@broadcom.com> wrote:
>
> On Tue, May 11, 2021 at 10:42 AM Lance Richardson
> <lance.richardson@broadcom.com> wrote:
> >
> > On Tue, May 11, 2021 at 10:31 AM David Marchand
> > <david.marchand@redhat.com> wrote:
> > >
> > > On Fri, Mar 26, 2021 at 5:37 PM Lance Richardson
> > > <lance.richardson@broadcom.com> wrote:
> > > >
> > > > Fix two issues found when writing PMD unit tests for HW ptype and
> > > > L4 checksum offload:
> > >
> > > Would those unit tests be interesting to other pmd driver writers?
> > >
> > I think so, although some adjustments would be needed to account
> > for differences in hardware capabilities. The tests I've written so far
> > are still very much a work in progress, but I hope to have something
> > ready for RFC in the near future.
>
> What is the current status of this patch?

I wanted feedback from bonding guys, but I'll get it in v21.08 now.
Thanks for the heads up.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] app/test: fix IPv6 header initialization
  2021-03-26 16:37 [dpdk-dev] [PATCH] app/test: fix IPv6 header initialization Lance Richardson
  2021-05-11 14:31 ` [dpdk-dev] [dpdk-stable] " David Marchand
@ 2021-07-05  8:22 ` David Marchand
  1 sibling, 0 replies; 6+ messages in thread
From: David Marchand @ 2021-07-05  8:22 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Declan Doherty, Pablo de Lara, dev, dpdk stable

On Fri, Mar 26, 2021 at 5:37 PM Lance Richardson
<lance.richardson@broadcom.com> wrote:
>
> Fix two issues found when writing PMD unit tests for HW ptype and
> L4 checksum offload:
>
>    - The version field in the IPv6 header was being set to zero,
>      which prevented hardware from recognizing it as IPv6. The
>      IP version field is now set to six.
>    - The payload_len field was being initialized using host byte
>      order, which (among other things) resulted in incorrect L4
>      checksum computation. The payload_len field is now set using
>      network (big-endian) byte order.
>
> Fixes: 92073ef961ee ("bond: unit tests")
> Cc: stable@dpdk.org
>
> Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-05  8:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26 16:37 [dpdk-dev] [PATCH] app/test: fix IPv6 header initialization Lance Richardson
2021-05-11 14:31 ` [dpdk-dev] [dpdk-stable] " David Marchand
2021-05-11 14:42   ` Lance Richardson
2021-06-21 12:40     ` Lance Richardson
2021-06-21 12:49       ` David Marchand
2021-07-05  8:22 ` David Marchand

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).