On 30/05/2017 11:09, Simon Horman wrote:
On Sun, May 28, 2017 at 02:59:47PM +0300, Roi Dayan wrote:
From: Paul Blakey <[email protected]>
Add a new API interface for offloading dpif flows to netdev.
The API consist on the following:
flow_put - offload a new flow
flow_get - query an offloaded flow
flow_del - delete an offloaded flow
flow_flush - flush all offloaded flows
flow_dump_* - dump all offloaded flows
In upcoming commits we will introduce an implementation of this
API for netdev-linux.
Signed-off-by: Paul Blakey <[email protected]>
Reviewed-by: Roi Dayan <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
This looks good to me, modulo the minor nits below, and I would
be happy to apply it if someone provided a review.
diff --git a/lib/netdev-tc-offloads.c b/lib/netdev-tc-offloads.c
new file mode 100644
index 0000000..46017d8
--- /dev/null
+++ b/lib/netdev-tc-offloads.c
@@ -0,0 +1,115 @@
...
+int
+netdev_tc_init_flow_api(struct netdev *netdev OVS_UNUSED)
+{
+ return 0;
+}
+
This introduces a blank line at the end of a file.
ok
...
diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
index 39093e8..2cad5cb 100644
--- a/lib/netdev-vport.c
+++ b/lib/netdev-vport.c
@@ -847,7 +847,16 @@ get_stats(const struct netdev *netdev, struct netdev_stats
*stats)
...
+bool
+netdev_flow_dump_next(struct netdev_flow_dump *dump,
+ struct match *match,
+ struct nlattr **actions,
+ struct dpif_flow_stats *stats,
+ ovs_u128 *ufid,
+ struct ofpbuf *rbuffer,
+ struct ofpbuf *wbuffer)
+{
It looks some of the lines in the function declaration could be
consolidated.
ok
+ const struct netdev_class *class = dump->netdev->netdev_class;
+
+ return (class->flow_dump_next
+ ? class->flow_dump_next(dump, match, actions, stats, ufid,
+ rbuffer, wbuffer)
+ : false);
+}
+
+int
+netdev_flow_put(struct netdev *netdev, struct match *match,
+ struct nlattr *actions, size_t act_len,
+ const ovs_u128 *ufid, struct offload_info *info,
+ struct dpif_flow_stats *stats)
+{
Like these ones are.
...
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev