From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 883D59A for ; Fri, 17 Jan 2014 12:18:29 +0100 (CET) Received: by mail-wg0-f47.google.com with SMTP id m15so4269197wgh.26 for ; Fri, 17 Jan 2014 03:19:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:organization:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=AT2p1atDyfBcphJg2vDKQjchNZLNIiqRPa09LYPDiD4=; b=E3HTHuhknc9VTOSKSrvmI9aUSCHe0T3H8wcjA6nyBKNnybl9C9+YD1zSGPX1jgIKyc T5Gr4VmiJW44NyqWXdMdgNF/FHGdiVktfbUTfIWZBRUhZ0tn5pklZ26xHwReZmska8GT tY6Pv6NQ6CoN4aNXqKmGVWdOvAayJlO0P6WfPqNp7rOF7Vn0WE3XHqeXCH4pmMzbq9aM lhHGBJkweetFpsAp8+/3plNFDfbkEJDIuJjYMaB1AdSZq9F9ijjIfFbE3/Ty1bD92NfL q5UDuFcMQhBFrr4DKOb6RvUhKaPNLZ07oSDKmBR78kZNtr9iMhgBmpFvWM9Uf8CJwKpp 4nzg== X-Gm-Message-State: ALoCoQnCiJutGLe+wZX1CsD1ZZytjYdqULipY1Qj2V5Xgj9gELa3Z/QR6rm1URMTHIH2Q9x/TtBw X-Received: by 10.180.188.100 with SMTP id fz4mr1965289wic.57.1389957583900; Fri, 17 Jan 2014 03:19:43 -0800 (PST) Received: from angus.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id jw4sm9051395wjc.20.2014.01.17.03.19.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jan 2014 03:19:43 -0800 (PST) From: Thomas Monjalon Organization: 6WIND To: Daniel Kaminsky , "Zhang, Helin" Date: Fri, 17 Jan 2014 12:19:41 +0100 User-Agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201401171219.41797.thomas.monjalon@6wind.com> 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: Fri, 17 Jan 2014 11:18:29 -0000 > > From: Daniel Kaminsky [...] > > > 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. > On Wed, Dec 25, 2013 at 2:50 AM, Zhang, Helin wrote: [...] > > Yes. That's a bug, and it will be fixed in later DPDK releases. 25/12/2013 07:57, Daniel Kaminsky: [...] > The "fix" below works for me but I don't think it's complete and correct > for all kernels. > > --- 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); > } Thanks Daniel. Please Helin, could you share the complete patch in case Daniel's one is not sufficient ? -- Thomas