Skip to content

Commit

Permalink
netdev-tc-offloads: Properly get the block id on flow del/get
Browse files Browse the repository at this point in the history
Currnetly, when a tc flow is installed on a bond port using shared blocks,
we get these failures from the validator threads:

2019-03-17T10:02:58.919Z|13369|dpif(revalidator93)|WARN|system@ovs-system: failed to flow_del \
	(No such file or directory) ufid:ebe2888b-9886-4835-a42e-c2911f6af6e8 skb_priority(0),skb_mark(0),in_port(2), \
	packet_type(ns=0,id=0),eth(src=e4:11:22:33:44:71,dst=24:8a:07:88:28:12),eth_type(0x0806), [..]

The block id must be retrieved from the device we got by ufid lookup and
not from the input to the related function, fix that for flow del and get.

While here, add the block id to existing debug print.

Fixes: 88dcf2a ('netdev-provider: add class op to get block_id')
Signed-off-by: Or Gerlitz <[email protected]>
Signed-off-by: Paul Blakey <[email protected]>
Reviewed-by: Roi Dayan <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
ogerlitz authored and shorman-netronome committed Mar 18, 2019
1 parent b1307a4 commit 41c2e25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/netdev-tc-offloads.c
Original file line number Diff line number Diff line change
@@ -1387,9 +1387,9 @@ netdev_tc_flow_get(struct netdev *netdev OVS_UNUSED,
return -ifindex;
}

VLOG_DBG_RL(&rl, "flow get (dev %s prio %d handle %d)",
netdev_get_name(dev), prio, handle);
block_id = get_block_id_from_netdev(netdev);
block_id = get_block_id_from_netdev(dev);
VLOG_DBG_RL(&rl, "flow get (dev %s prio %d handle %d block_id %d)",
netdev_get_name(dev), prio, handle, block_id);
err = tc_get_flower(ifindex, prio, handle, &flower, block_id);
netdev_close(dev);
if (err) {
@@ -1433,7 +1433,7 @@ netdev_tc_flow_del(struct netdev *netdev OVS_UNUSED,
return -ifindex;
}

block_id = get_block_id_from_netdev(netdev);
block_id = get_block_id_from_netdev(dev);

if (stats) {
memset(stats, 0, sizeof *stats);

0 comments on commit 41c2e25

Please sign in to comment.