Skip to content

Commit 807e329

Browse files
committed
Merge branch 'nfp-flower-fix-bugs-in-merge-tunnel-encap-code'
Jakub Kicinski says: ==================== nfp: flower: fix bugs in merge tunnel encap code John says: There are few bugs in the merge encap code that have come to light with recent driver changes. Effectively, flow bind callbacks were being registered twice when using internal ports (new 'busy' code triggers this). There was also an issue with neighbour notifier messages being ignored for internal ports. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 80a6a5d + e8024cb commit 807e329

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

drivers/net/ethernet/netronome/nfp/flower/offload.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,9 +1409,10 @@ nfp_flower_setup_indr_tc_block(struct net_device *netdev, struct nfp_app *app,
14091409
struct nfp_flower_priv *priv = app->priv;
14101410
struct flow_block_cb *block_cb;
14111411

1412-
if (f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS &&
1413-
!(f->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS &&
1414-
nfp_flower_internal_port_can_offload(app, netdev)))
1412+
if ((f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS &&
1413+
!nfp_flower_internal_port_can_offload(app, netdev)) ||
1414+
(f->binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS &&
1415+
nfp_flower_internal_port_can_offload(app, netdev)))
14151416
return -EOPNOTSUPP;
14161417

14171418
switch (f->command) {

drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,13 +328,13 @@ nfp_tun_neigh_event_handler(struct notifier_block *nb, unsigned long event,
328328

329329
flow.daddr = *(__be32 *)n->primary_key;
330330

331-
/* Only concerned with route changes for representors. */
332-
if (!nfp_netdev_is_nfp_repr(n->dev))
333-
return NOTIFY_DONE;
334-
335331
app_priv = container_of(nb, struct nfp_flower_priv, tun.neigh_nb);
336332
app = app_priv->app;
337333

334+
if (!nfp_netdev_is_nfp_repr(n->dev) &&
335+
!nfp_flower_internal_port_can_offload(app, n->dev))
336+
return NOTIFY_DONE;
337+
338338
/* Only concerned with changes to routes already added to NFP. */
339339
if (!nfp_tun_has_route(app, flow.daddr))
340340
return NOTIFY_DONE;

0 commit comments

Comments
 (0)