From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Dangaard Brouer Subject: Re: [PATCH v15 ] net/veth/XDP: Line-rate packet forwarding in kernel Date: Wed, 4 Apr 2018 08:16:04 +0200 Message-ID: <20180404081604.422e8a97@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, David Miller , David Ahern , stephen@networkplumber.org, agaceph@gmail.com, Pavel Emelyanov , Eric Dumazet , alexei.starovoitov@gmail.com, brouer@redhat.com To: "Md. Islam" Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55376 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751722AbeDDGQJ (ORCPT ); Wed, 4 Apr 2018 02:16:09 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Sun, 1 Apr 2018 20:47:28 -0400 Md. Islam" wrote: > [...] More specifically, header parsing and fib > lookup only takes around 82 ns. This shows that this could be used to > implement linerate packet forwarding in kernel. I cannot resist correcting you... You didn't specify the link speed, but assuming 10Gbit/s, then the linerate is 14.88Mpps, which is 67.2 ns between arriving packets. Thus, if the lookup cost is 82 ns, thus you cannot claim linerate performance with these numbers. Details: This is calculated based on the the minimum Ethernet frame size 84-bytes, see https://en.wikipedia.org/wiki/Ethernet_frame for why this is the minimum size. 10*10^9/(84*8) = 14,880,952 pps 1/last*10^9 = 67.2 ns -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer