All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] nfp: flower: ensure dead neighbour entries are not offloaded
@ 2018-07-21  4:07 Jakub Kicinski
  2018-07-22 17:56 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Kicinski @ 2018-07-21  4:07 UTC (permalink / raw)
  To: davem; +Cc: oss-drivers, netdev, John Hurley

From: John Hurley <john.hurley@netronome.com>

Previously only the neighbour state was checked to decide if an offloaded
entry should be removed. However, there can be situations when the entry
is dead but still marked as valid. This can lead to dead entries not
being removed from fw tables or even incorrect data being added.

Check the entry dead bit before deciding if it should be added to or
removed from fw neighbour tables.

Fixes: 8e6a9046b66a ("nfp: flower vxlan neighbour offload")
Signed-off-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
 drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c b/drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c
index 78afe75129ab..382bb93cb090 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c
+++ b/drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c
@@ -317,7 +317,7 @@ nfp_tun_write_neigh(struct net_device *netdev, struct nfp_app *app,
 	payload.dst_ipv4 = flow->daddr;
 
 	/* If entry has expired send dst IP with all other fields 0. */
-	if (!(neigh->nud_state & NUD_VALID)) {
+	if (!(neigh->nud_state & NUD_VALID) || neigh->dead) {
 		nfp_tun_del_route_from_cache(app, payload.dst_ipv4);
 		/* Trigger ARP to verify invalid neighbour state. */
 		neigh_event_send(neigh, NULL);
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] nfp: flower: ensure dead neighbour entries are not offloaded
  2018-07-21  4:07 [PATCH net] nfp: flower: ensure dead neighbour entries are not offloaded Jakub Kicinski
@ 2018-07-22 17:56 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-22 17:56 UTC (permalink / raw)
  To: jakub.kicinski; +Cc: oss-drivers, netdev, john.hurley

From: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Fri, 20 Jul 2018 21:07:54 -0700

> From: John Hurley <john.hurley@netronome.com>
> 
> Previously only the neighbour state was checked to decide if an offloaded
> entry should be removed. However, there can be situations when the entry
> is dead but still marked as valid. This can lead to dead entries not
> being removed from fw tables or even incorrect data being added.
> 
> Check the entry dead bit before deciding if it should be added to or
> removed from fw neighbour tables.
> 
> Fixes: 8e6a9046b66a ("nfp: flower vxlan neighbour offload")
> Signed-off-by: John Hurley <john.hurley@netronome.com>
> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>

Patch applied and queued up for -stable, thanks Jakub.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-22 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-21  4:07 [PATCH net] nfp: flower: ensure dead neighbour entries are not offloaded Jakub Kicinski
2018-07-22 17:56 ` David Miller

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.