Re: [vpp-dev] Static ARP Flag Question
On Tue, May 15, 2018 at 8:53 PM, John Lo (loj)wrote: > Hi Jon, > > > > I am in the process of fixing up something in handling of IP neighbor > pools. I can include fixing the S/D bits of ARP flag in my patch, if you > are not in a hurry to have this fixed. > > > > Regards, > > John > John, Heh. It has just now bubbled up to the top on my To Do list! I'll look around to see if you beat me to it... jdl
Re: [vpp-dev] Static ARP Flag Question
Hi Jon, I am in the process of fixing up something in handling of IP neighbor pools. I can include fixing the S/D bits of ARP flag in my patch, if you are not in a hurry to have this fixed. Regards, John From: Jon Loeliger <j...@netgate.com> Sent: Friday, May 11, 2018 12:09 PM To: John Lo (loj) <l...@cisco.com> Cc: vpp-dev <vpp-dev@lists.fd.io> Subject: Re: [vpp-dev] Static ARP Flag Question On Thu, May 10, 2018 at 7:28 PM, John Lo (loj) <l...@cisco.com<mailto:l...@cisco.com>> wrote: Hi Jon, Hi John, This is not the right behavior. I had that suspicion... :-) I think it is caused by reuse of a static ARP entry in the IP4 neighbor pool with static bit still set. The code merely set the dynamic bit in the flags but left the static bit untouched (similarly for the static path) in arp.c function vnet_arp_set_ip4_over_ethernet_internal (): e->time_last_updated = vlib_time_now (vm); if (is_static) e->flags |= ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC; else e->flags |= ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC; Ah, right. So it should always be one or the other, and never both. Right? I spotted another error in the function vnet_arp_flush_ip4_over_ethernet_internal() if (e->flags & ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC) { e->flags &= ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC; } else if (e->flags & ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC) { arp_entry_free (eai, e); } I believe the “if static” path should be: e->flags &= ~ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC; Would you like to submit a patch to fix them? Sure! I will make a first-effort and submit a patch! jdl
Re: [vpp-dev] Static ARP Flag Question
On Thu, May 10, 2018 at 7:28 PM, John Lo (loj)wrote: > Hi Jon, > Hi John, > This is not the right behavior. > I had that suspicion... :-) I think it is caused by reuse of a static ARP entry in the IP4 neighbor > pool with static bit still set. The code merely set the dynamic bit in the > flags but left the static bit untouched (similarly for the static path) in > arp.c function vnet_arp_set_ip4_over_ethernet_internal (): > > > > e->time_last_updated = vlib_time_now (vm); > > if (is_static) > > e->flags |= ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC; > > else > > e->flags |= ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC; > Ah, right. So it should always be one or the other, and never both. Right? I spotted another error in the function vnet_arp_flush_ip4_over_ > ethernet_internal() > > > > if (e->flags & ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC) > > { > > e->flags &= ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC; > > } > > else if (e->flags & ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC) > > { > > arp_entry_free (eai, e); > > } > > > > I believe the “if static” path should be: > > e->flags &= ~ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC; > > > > Would you like to submit a patch to fix them? > Sure! I will make a first-effort and submit a patch! jdl
Re: [vpp-dev] Static ARP Flag Question
Hi Jon, This is not the right behavior. I think it is caused by reuse of a static ARP entry in the IP4 neighbor pool with static bit still set. The code merely set the dynamic bit in the flags but left the static bit untouched (similarly for the static path) in arp.c function vnet_arp_set_ip4_over_ethernet_internal (): e->time_last_updated = vlib_time_now (vm); if (is_static) e->flags |= ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC; else e->flags |= ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC; I spotted another error in the function vnet_arp_flush_ip4_over_ethernet_internal() if (e->flags & ETHERNET_ARP_IP4_ENTRY_FLAG_STATIC) { e->flags &= ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC; } else if (e->flags & ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC) { arp_entry_free (eai, e); } I believe the “if static” path should be: e->flags &= ~ETHERNET_ARP_IP4_ENTRY_FLAG_DYNAMIC; Would you like to submit a patch to fix them? Regards, John From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Jon Loeliger Sent: Wednesday, May 09, 2018 2:04 PM To: vpp-dev <vpp-dev@lists.fd.io> Subject: [vpp-dev] Static ARP Flag Question VPP-ers, Is this expected behavior for the Flags here? Thanks, jdl vpp# set int ip address TenGigabitEthernet6/0/0 10.10.20.1/24<http://10.10.20.1/24> vpp# set interface state TenGigabitEthernet6/0/0 up vpp# set ip arp TenGigabitEthernet6/0/0 10.10.20.100 08:00:27:41:a7:56 static vpp# show ip arp Time IP4 Flags Ethernet Interface 53.7857 10.10.20.100 S08:00:27:41:a7:56 TenGigabitEthernet6/0/0 vpp# set ip arp del TenGigabitEthernet6/0/0 10.10.20.100 08:00:27:41:a7:56 static vpp# show ip arp vpp# set ip arp TenGigabitEthernet6/0/0 10.10.20.100 08:00:27:41:a7:56 vpp# show ip arp Time IP4 Flags Ethernet Interface 90.9054 10.10.20.100SD08:00:27:41:a7:56 TenGigabitEthernet6/0/0