From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) by dpdk.org (Postfix) with ESMTP id 6A77C156 for ; Wed, 25 Dec 2013 07:56:03 +0100 (CET) Received: by mail-vb0-f53.google.com with SMTP id o19so3641258vbm.40 for ; Tue, 24 Dec 2013 22:57:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=xu1xIMFSOQ2J2oDVpVEKZonjUlmkiZz7nSJBi2h2E4A=; b=WOHPlCc/1B4GnPMpv1GokP5D7TikwTYdqowkc1/zQA+GJW/CWlMMUG78VC7LUlr6PQ 1pM5ZDADhgcOEwUEZoPLyDyWkDxM5Y6k6sCb69EE1Khdfy+9zCkxgSJRzTQ/WyNqGRGH PW0x3+FTyRPkf88GJseOVRTBbNSFvc6M8lLUw62n1avd+I117dswNGjayUTDeYRhrpwL 1h/UaPwXlDSy4FUgjrJuuU5mJ9FnwjmjTDXUQFjpiAFPkFTqqpbtXWoOAzDnwVrksqV4 nwUh+4cH81x52HlUthgLdkZw1OHcKP8+yGOxaFPgK2ozWQRSypIVlZgLJT1iGsnPEKn2 Rz5Q== X-Gm-Message-State: ALoCoQkL0F3MHeT389nS5qNagx91TeHovAiv1cHfgpC/viyjqJGFakKUOfZeNnFL0wDAm5Ef16YW MIME-Version: 1.0 X-Received: by 10.58.44.72 with SMTP id c8mr109222vem.37.1387954631426; Tue, 24 Dec 2013 22:57:11 -0800 (PST) Received: by 10.58.41.99 with HTTP; Tue, 24 Dec 2013 22:57:11 -0800 (PST) X-Originating-IP: [109.64.120.65] In-Reply-To: References: Date: Wed, 25 Dec 2013 08:57:11 +0200 Message-ID: From: Daniel Kaminsky To: "Zhang, Helin" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] Loop back mode of the KNI X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 06:56:03 -0000 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 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 >