> On 29 Apr 2021, at 02:20, Alexandr Nedvedicky 
> <alexandr.nedvedi...@oracle.com> wrote:
> 
> </snip>
>> 
>> This time arpcache() is only called by netisr() with both kernel and
>> exclusive net locks held. RTM_DELETE message processing will also call
>> ifp->if_rtrequest() with exclusive netlock held.
>> 
>> So this while() loop within arpcache() can’t be broken by “arp -a -d”.
> 
>    completely agree.
> 
>> 
>> Also netlock serializes arpcache() and arpresolve().
>> 
> 
>    I agree arepcache() always runs as a writer on netlock + KERNEL_LOCK
> 
>    I suspect arpresolve() might be running also as a reader on netlock.
>    this happens when we forward packet. I think forwarded packets runs
>    arpresolve() as a reader on netlock, when it is dispatched/forwarded
>    to outbound interface.

Sure, but this arpresolve() threads can’t insert packet to la->la_mq
while we perform arpcache() because of exclusive netlock.

Reply via email to