Subject: Re: [PATCH v15 ] net/veth/XDP: Line-rate packet forwarding in kernel

From: Jesper Dangaard Brouer <[email-masked]>
Date: Wed, 4 Apr 2018 08:16:04 +0200

On Sun, 1 Apr 2018 20:47:28 -0400 Md. Islam" <[email-masked]> 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