DPDK patches and discussions
 help / color / mirror / Atom feed
From: Daniel Kaminsky <daniel.kaminsky@infinitelocality.com>
To: "Zhang, Helin" <helin.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Loop back mode of the KNI
Date: Wed, 25 Dec 2013 08:57:11 +0200	[thread overview]
Message-ID: <CA+8v-JyZSmgWRnNhAtjuFy6-+4ajPpS0EcD0VfP+=vsUBdLJmg@mail.gmail.com> (raw)
In-Reply-To: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A6877FB@SHSMSX104.ccr.corp.intel.com>

Thanks Helin,

The "fix" below works for me but I don't think it's complete and correct
for all kernels.

Daniel

Index: src/kernel/fast_kni/kni_net.c
===================================================================
--- src/kernel/fast_kni/kni_net.c
+++ src/kernel/fast_kni/kni_net.c
@@ -353,6 +353,12 @@
  kni->stats.rx_bytes += len;
  kni->stats.rx_packets++;

+                        /* adjust the skb */
+                        if (likely(skb_mac_header_was_set(skb))) {
+                            skb->len += ETH_HLEN;
+                            skb->data -= ETH_HLEN;
+                        }
+
  /* call tx interface */
  kni_net_tx(skb, dev);
  }



On Wed, Dec 25, 2013 at 2:50 AM, Zhang, Helin <helin.zhang@intel.com> wrote:

> Hi Daniel
>
> Thanks for your good catch!
> Yes. That's a bug, and it will be fixed in later DPDK releases.
>
> Regards,
> Helin
>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Daniel Kaminsky
> Sent: Friday, December 20, 2013 12:36 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] Loop back mode of the KNI
>
> Hi all,
>
> We're working on the KNI and we see a strange behavior which seems like a
> bug in the the kernel module.
>
> When running with *lo_mode=lo_mode_fifo *everything works as expected, the
> packets looks similar on the ingress and egress.
> But when running with *lo_mode=lo_mode_fifo_skb *the packets on the egress
> doesn't include the first 14 bytes (the ethernet header) although the
> packets size doesn't change.
>
> Thanks,
> Daniel
>

  reply	other threads:[~2013-12-25  6:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 16:36 Daniel Kaminsky
2013-12-25  0:50 ` Zhang, Helin
2013-12-25  6:57   ` Daniel Kaminsky [this message]
2014-01-17 11:19     ` Thomas Monjalon
2014-01-17 14:28       ` Zhang, Helin
2014-01-17 15:35         ` 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='CA+8v-JyZSmgWRnNhAtjuFy6-+4ajPpS0EcD0VfP+=vsUBdLJmg@mail.gmail.com' \
    --to=daniel.kaminsky@infinitelocality.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.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).