On Thu, Apr 22, 2021 at 12:26:50AM +0200, Alexander Bluhm wrote:
> As a wild guess, you could apply this diff on top.  Something similar
> has fixed IPv6 NDP problem I have seen.  Maybe it is in the routing
> table, that is used for ARP and NDP.

Here are the performance numbers for forwarding with kernel lock
around ARP.  Columns are:
1. current, 21 April
2. parallel nettask, kernel lock around ARP
3. parallel nettask, remove ipsec hack 
4. parallel nettask
http://bluhm.genua.de/perform/results/2021-04-21T10%3A50%3A37Z/gnuplot/forward.png

Interresting is, that the forwarding performance spreads much more
when we have kernel lock around arp.  So maybe different timing
hides the bug.

All the data, you can click on "diff" to see what was tested.
http://bluhm.genua.de/perform/results/2021-04-21T10%3A50%3A37Z/perform.html

> --- net/if_ethersubr.c
> +++ net/if_ethersubr.c
> @@ -222,7 +222,10 @@ ether_resolve(struct ifnet *ifp, struct mbuf *m, struct 
> sockaddr *dst,
>  
>       switch (af) {
>       case AF_INET:
> +             KERNEL_LOCK();
> +             /* XXXSMP there is a MP race in arpresolve() */
>               error = arpresolve(ifp, rt, m, dst, eh->ether_dhost);
> +             KERNEL_UNLOCK();
>               if (error)
>                       return (error);
>               eh->ether_type = htons(ETHERTYPE_IP);

Reply via email to