2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 05:47:55 +00:00

netdev-tc-offloads: Properly get the block id on flow del/get

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: 88dcf2aa8234 ('netdev-provider: add class op to get block_id')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
This commit is contained in:
Or Gerlitz 2019-03-17 16:13:25 +02:00 committed by Simon Horman
parent b1307a45fe
commit 41c2e25c3d

View File

@ -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);