[ovs-dev] [PATCH V9 10/31] netdev-tc-offloads: Implement netdev flow flush using tc interface
Roi Dayan
roid at mellanox.com
Sun May 28 11:59:52 UTC 2017
From: Paul Blakey <paulb at mellanox.com>
Signed-off-by: Paul Blakey <paulb at mellanox.com>
Reviewed-by: Roi Dayan <roid at mellanox.com>
Reviewed-by: Simon Horman <simon.horman at netronome.com>
---
lib/netdev-tc-offloads.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/lib/netdev-tc-offloads.c b/lib/netdev-tc-offloads.c
index 46017d8..e766972 100644
--- a/lib/netdev-tc-offloads.c
+++ b/lib/netdev-tc-offloads.c
@@ -36,10 +36,20 @@
VLOG_DEFINE_THIS_MODULE(netdev_tc_offloads);
+static struct vlog_rate_limit error_rl = VLOG_RATE_LIMIT_INIT(60, 5);
+
int
-netdev_tc_flow_flush(struct netdev *netdev OVS_UNUSED)
+netdev_tc_flow_flush(struct netdev *netdev)
{
- return EOPNOTSUPP;
+ int ifindex = netdev_get_ifindex(netdev);
+
+ if (ifindex < 0) {
+ VLOG_ERR_RL(&error_rl, "failed to get ifindex for %s: %s",
+ netdev_get_name(netdev), ovs_strerror(-ifindex));
+ return -ifindex;
+ }
+
+ return tc_flush(ifindex);
}
int
--
2.7.4
More information about the dev
mailing list