2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

tc: Support new terse dump kernel API

When dumping flows in terse mode set TCA_DUMP_FLAGS attribute to
TCA_DUMP_FLAGS_TERSE flag to prevent unnecessary copying of data between
kernel and user spaces. Only expect kernel to provide cookie, stats and
flags when dumping filters in terse mode.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
This commit is contained in:
Vlad Buslov
2020-06-04 13:47:01 +03:00
committed by Simon Horman
parent 191536574e
commit 5db012c4ac
3 changed files with 51 additions and 17 deletions

View File

@@ -390,7 +390,7 @@ netdev_tc_flow_dump_create(struct netdev *netdev,
dump->terse = terse;
id = tc_make_tcf_id(ifindex, block_id, prio, hook);
tc_dump_flower_start(&id, dump->nl_dump);
tc_dump_flower_start(&id, dump->nl_dump, terse);
*dump_out = dump;
@@ -951,7 +951,7 @@ netdev_tc_flow_dump_next(struct netdev_flow_dump *dump,
while (nl_dump_next(dump->nl_dump, &nl_flow, rbuffer)) {
struct tc_flower flower;
if (parse_netlink_to_tc_flower(&nl_flow, &id, &flower)) {
if (parse_netlink_to_tc_flower(&nl_flow, &id, &flower, dump->terse)) {
continue;
}