On 25 December 2016 at 03:39, Paul Blakey <[email protected]> wrote:
> Signed-off-by: Paul Blakey <[email protected]>
> Reviewed-by: Roi Dayan <[email protected]>
> ---
<snip>
> @@ -764,6 +772,27 @@ struct netdev_class {
>
> /* Discards all packets waiting to be received from 'rx'. */
> int (*rxq_drain)(struct netdev_rxq *rx);
> +
> +/* ## -------------------------------- ## */
> +/* ## netdev flow offloading functions ## */
> +/* ## -------------------------------- ## */
> +
> +/* If a particular netdev class does not support offloading flows, all these
> + * function pointers must be NULL. */
> +
> + int (*flow_flush)(struct netdev *);
> + struct netdev_flow_dump *(*flow_dump_create)(struct netdev *);
> + int (*flow_dump_destroy)(struct netdev_flow_dump *);
> + bool (*flow_dump_next)(struct netdev_flow_dump *, struct match *,
> + struct nlattr **actions,
> + struct dpif_flow_stats *stats, ovs_u128 *ufid,
> + struct ofpbuf *rbuffer, struct ofpbuf *wbuffer);
> + int (*flow_put)(struct netdev *, struct match *, struct nlattr *actions,
> + size_t actions_len, struct dpif_flow_stats *, ovs_u128
> *);
> + int (*flow_get)(struct netdev *, struct match *, struct nlattr **actions,
> + struct dpif_flow_stats *, ovs_u128 *, struct ofpbuf *);
> + int (*flow_del)(struct netdev *, struct dpif_flow_stats *, ovs_u128 *);
> + int (*init_flow_api)(struct netdev *);
> };
Please add comments to describe the constraints on these APIs. Thread
safety. Ordering. etc. See some of the other examples in this file and
dpif-provider.h.
<snip>
> +int
> +netdev_tc_init_flow_api(struct netdev *netdev OVS_UNUSED)
> +{
> + return 0;
> +}
This function seems pointless. If it's needed later, we can always add
it at that time.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev