* [PATCH net-next 0/2] vxlan: misc fdb fixes @ 2017-01-21 7:43 Roopa Prabhu 2017-01-21 7:43 ` [PATCH net-next 1/2] vxlan: don't flush static fdb entries on admin down Roopa Prabhu 2017-01-21 7:43 ` [PATCH net-next 2/2] vxlan: do not age static remote mac entries Roopa Prabhu 0 siblings, 2 replies; 7+ messages in thread From: Roopa Prabhu @ 2017-01-21 7:43 UTC (permalink / raw) To: davem; +Cc: netdev, ramanb, stephen, jbenc, pshelar From: Roopa Prabhu <roopa@cumulusnetworks.com> Balakrishnan Raman (1): vxlan: do not age static remote mac entries Roopa Prabhu (1): vxlan: don't flush static fdb entries on admin down drivers/net/vxlan.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next 1/2] vxlan: don't flush static fdb entries on admin down 2017-01-21 7:43 [PATCH net-next 0/2] vxlan: misc fdb fixes Roopa Prabhu @ 2017-01-21 7:43 ` Roopa Prabhu 2017-01-23 8:55 ` Jiri Benc 2017-01-23 21:07 ` David Miller 2017-01-21 7:43 ` [PATCH net-next 2/2] vxlan: do not age static remote mac entries Roopa Prabhu 1 sibling, 2 replies; 7+ messages in thread From: Roopa Prabhu @ 2017-01-21 7:43 UTC (permalink / raw) To: davem; +Cc: netdev, ramanb, stephen, jbenc, pshelar From: Roopa Prabhu <roopa@cumulusnetworks.com> This patch skips flushing static fdb entries in ndo_stop, but flushes all fdb entries during vxlan device delete. This is consistent with the bridge driver fdb Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> --- drivers/net/vxlan.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 19b1653..269e515 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -2354,7 +2354,7 @@ static int vxlan_open(struct net_device *dev) } /* Purge the forwarding table */ -static void vxlan_flush(struct vxlan_dev *vxlan) +static void vxlan_flush(struct vxlan_dev *vxlan, int do_all) { unsigned int h; @@ -2364,6 +2364,8 @@ static void vxlan_flush(struct vxlan_dev *vxlan) hlist_for_each_safe(p, n, &vxlan->fdb_head[h]) { struct vxlan_fdb *f = container_of(p, struct vxlan_fdb, hlist); + if (!do_all && (f->state & (NUD_PERMANENT | NUD_NOARP))) + continue; /* the all_zeros_mac entry is deleted at vxlan_uninit */ if (!is_zero_ether_addr(f->eth_addr)) vxlan_fdb_destroy(vxlan, f); @@ -2385,7 +2387,7 @@ static int vxlan_stop(struct net_device *dev) del_timer_sync(&vxlan->age_timer); - vxlan_flush(vxlan); + vxlan_flush(vxlan, 0); vxlan_sock_release(vxlan); return ret; @@ -3058,6 +3060,8 @@ static void vxlan_dellink(struct net_device *dev, struct list_head *head) struct vxlan_dev *vxlan = netdev_priv(dev); struct vxlan_net *vn = net_generic(vxlan->net, vxlan_net_id); + vxlan_flush(vxlan, 1); + spin_lock(&vn->sock_lock); if (!hlist_unhashed(&vxlan->hlist)) hlist_del_rcu(&vxlan->hlist); -- 1.9.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] vxlan: don't flush static fdb entries on admin down 2017-01-21 7:43 ` [PATCH net-next 1/2] vxlan: don't flush static fdb entries on admin down Roopa Prabhu @ 2017-01-23 8:55 ` Jiri Benc 2017-01-23 16:31 ` Roopa Prabhu 2017-01-23 21:07 ` David Miller 1 sibling, 1 reply; 7+ messages in thread From: Jiri Benc @ 2017-01-23 8:55 UTC (permalink / raw) To: Roopa Prabhu; +Cc: davem, netdev, ramanb, stephen, pshelar On Fri, 20 Jan 2017 23:43:18 -0800, Roopa Prabhu wrote: > This patch skips flushing static fdb entries in > ndo_stop, but flushes all fdb entries during vxlan > device delete. This is consistent with the bridge > driver fdb This makes sense but isn't this a uAPI change? Do you know whether there are users relying on the current behavior? Jiri ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] vxlan: don't flush static fdb entries on admin down 2017-01-23 8:55 ` Jiri Benc @ 2017-01-23 16:31 ` Roopa Prabhu 0 siblings, 0 replies; 7+ messages in thread From: Roopa Prabhu @ 2017-01-23 16:31 UTC (permalink / raw) To: Jiri Benc; +Cc: davem, netdev, ramanb, stephen, pshelar On 1/23/17, 12:55 AM, Jiri Benc wrote: > On Fri, 20 Jan 2017 23:43:18 -0800, Roopa Prabhu wrote: >> This patch skips flushing static fdb entries in >> ndo_stop, but flushes all fdb entries during vxlan >> device delete. This is consistent with the bridge >> driver fdb > This makes sense but isn't this a uAPI change? Do you know whether > there are users relying on the current behavior? > yeah, i have debated about this also. I am sitting on a stash of such patches which are borderline bug fixes but been out there long enough that people might care. I leaned towards making it the default because, - I am assuming not many people use static entries - and people will not be very unhappy with this change....because it does not delete something they had...just retains them. - Per device flag seems like an overkill here Also, i think some such changes were done to the bridge driver too after it was out. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] vxlan: don't flush static fdb entries on admin down 2017-01-21 7:43 ` [PATCH net-next 1/2] vxlan: don't flush static fdb entries on admin down Roopa Prabhu 2017-01-23 8:55 ` Jiri Benc @ 2017-01-23 21:07 ` David Miller 2017-01-24 0:14 ` Roopa Prabhu 1 sibling, 1 reply; 7+ messages in thread From: David Miller @ 2017-01-23 21:07 UTC (permalink / raw) To: roopa; +Cc: netdev, ramanb, stephen, jbenc, pshelar From: Roopa Prabhu <roopa@cumulusnetworks.com> Date: Fri, 20 Jan 2017 23:43:18 -0800 > /* Purge the forwarding table */ > -static void vxlan_flush(struct vxlan_dev *vxlan) > +static void vxlan_flush(struct vxlan_dev *vxlan, int do_all) Please use 'bool' and true/false for this new argument. FWIW, I am fine with changing the default behavior in this way. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] vxlan: don't flush static fdb entries on admin down 2017-01-23 21:07 ` David Miller @ 2017-01-24 0:14 ` Roopa Prabhu 0 siblings, 0 replies; 7+ messages in thread From: Roopa Prabhu @ 2017-01-24 0:14 UTC (permalink / raw) To: David Miller; +Cc: netdev, ramanb, stephen, jbenc, pshelar On 1/23/17, 1:07 PM, David Miller wrote: > From: Roopa Prabhu <roopa@cumulusnetworks.com> > Date: Fri, 20 Jan 2017 23:43:18 -0800 > >> /* Purge the forwarding table */ >> -static void vxlan_flush(struct vxlan_dev *vxlan) >> +static void vxlan_flush(struct vxlan_dev *vxlan, int do_all) > Please use 'bool' and true/false for this new argument. > > FWIW, I am fine with changing the default behavior in this way. ack, will fix and post a v2, thanks. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next 2/2] vxlan: do not age static remote mac entries 2017-01-21 7:43 [PATCH net-next 0/2] vxlan: misc fdb fixes Roopa Prabhu 2017-01-21 7:43 ` [PATCH net-next 1/2] vxlan: don't flush static fdb entries on admin down Roopa Prabhu @ 2017-01-21 7:43 ` Roopa Prabhu 1 sibling, 0 replies; 7+ messages in thread From: Roopa Prabhu @ 2017-01-21 7:43 UTC (permalink / raw) To: davem; +Cc: netdev, ramanb, stephen, jbenc, pshelar From: Balakrishnan Raman <ramanb@cumulusnetworks.com> Mac aging is applicable only for dynamically learnt remote mac entries. Check for user configured static remote mac entries and skip aging. Signed-off-by: Balakrishnan Raman <ramanb@cumulusnetworks.com> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> --- drivers/net/vxlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 269e515..2c5bb0a 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -2268,7 +2268,7 @@ static void vxlan_cleanup(unsigned long arg) = container_of(p, struct vxlan_fdb, hlist); unsigned long timeout; - if (f->state & NUD_PERMANENT) + if (f->state & (NUD_PERMANENT | NUD_NOARP)) continue; timeout = f->used + vxlan->cfg.age_interval * HZ; -- 1.9.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-01-24 0:15 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-01-21 7:43 [PATCH net-next 0/2] vxlan: misc fdb fixes Roopa Prabhu 2017-01-21 7:43 ` [PATCH net-next 1/2] vxlan: don't flush static fdb entries on admin down Roopa Prabhu 2017-01-23 8:55 ` Jiri Benc 2017-01-23 16:31 ` Roopa Prabhu 2017-01-23 21:07 ` David Miller 2017-01-24 0:14 ` Roopa Prabhu 2017-01-21 7:43 ` [PATCH net-next 2/2] vxlan: do not age static remote mac entries Roopa Prabhu
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.