Subject: Re: [PATCH net-next 2/2] xdp: Add devmap_idx map type for looking up devices by ifindex

From: Jesper Dangaard Brouer <[email-masked]>
Date: Thu, 21 Feb 2019 16:23:48 +0100

On Thu, 21 Feb 2019 12:56:54 +0100
Toke Høiland-Jørgensen <[email-masked]> wrote:

> The default maps used by xdp_redirect() are changed to use the new map
> type, which means that xdp_redirect() is no longer limited to ifindex < 64,
> but instead to 64 total simultaneous interfaces per network namespace. This
> also provides an easy way to compare the performance of devmap and
> devmap_idx:
> 
> xdp_redirect_map (devmap): 8394560 pkt/s
> xdp_redirect (devmap_idx): 8179480 pkt/s
> 
> Difference: 215080 pkt/s or 3.1 nanoseconds per packet.

(1/8394560-1/8179480)*10^9 = -3.13239 ns

But was the xdp_redirect_map code-path affected from patch 1/1? 
(1/8412754-1/8394560)*10^9 = -0.2576 ns

It doesn't look like any performance regression to xdp_redirect_map
from these code changes :-)

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer