Regards _Sugesh
> -----Original Message----- > From: Roi Dayan [mailto:r...@mellanox.com] > Sent: Wednesday, February 15, 2017 7:16 AM > To: Chandran, Sugesh <sugesh.chand...@intel.com>; d...@openvswitch.org > Cc: r...@mellanox.com; Paul Blakey <pa...@mellanox.com>; Or Gerlitz > <ogerl...@mellanox.com>; Hadar Hen Zion <had...@mellanox.com>; Shahar > Klein <shah...@mellanox.com>; Mark Bloch <ma...@mellanox.com>; Rony > Efraim <ro...@mellanox.com>; Fastabend, John R > <john.r.fastab...@intel.com>; Joe Stringer <j...@ovn.org>; Andy > Gospodarek <a...@greyhouse.net>; Lance Richardson > <lrich...@redhat.com>; Marcelo Ricardo Leitner <mleit...@redhat.com>; > Simon Horman <simon.hor...@netronome.com>; Jiri Pirko > <j...@mellanox.com> > Subject: Re: [PATCH ovs V3 03/25] netdev: Adding a new netdev api to be > used for offloading flows > > > > On 14/02/2017 01:53, Chandran, Sugesh wrote: > > > > > > Regards > > _Sugesh > > > > > >> -----Original Message----- > >> From: Roi Dayan [mailto:r...@mellanox.com] > >> Sent: Wednesday, February 8, 2017 3:29 PM > >> To: d...@openvswitch.org > >> Cc: Paul Blakey <pa...@mellanox.com>; Or Gerlitz > >> <ogerl...@mellanox.com>; Hadar Hen Zion <had...@mellanox.com>; > Shahar > >> Klein <shah...@mellanox.com>; Mark Bloch <ma...@mellanox.com>; > Rony > >> Efraim <ro...@mellanox.com>; Fastabend, John R > >> <john.r.fastab...@intel.com>; Joe Stringer <j...@ovn.org>; Andy > >> Gospodarek <a...@greyhouse.net>; Lance Richardson > >> <lrich...@redhat.com>; Marcelo Ricardo Leitner > <mleit...@redhat.com>; > >> Simon Horman <simon.hor...@netronome.com>; Jiri Pirko > >> <j...@mellanox.com>; Chandran, Sugesh <sugesh.chand...@intel.com> > >> Subject: [PATCH ovs V3 03/25] netdev: Adding a new netdev api to be > >> used for offloading flows > >> > >> From: Paul Blakey <pa...@mellanox.com> > >> > > ..... > > > >> + > >> /* Network device class structure, to be defined by each > >> implementation of a > >> * network device. > >> * > >> @@ -769,6 +777,49 @@ struct netdev_class { > >> > >> /* Discards all packets waiting to be received from 'rx'. */ > >> int (*rxq_drain)(struct netdev_rxq *rx); > >> + > >> +/* ## -------------------------------- ## */ > >> +/* ## netdev flow offloading functions ## */ > >> +/* ## -------------------------------- ## */ > > [Sugesh] The netdev offload api are good to call out offload APIs. > Something like hw_offload_flow_flush or offload_flow_flush. Thoughts?? > > to make sure I understand. are you suggesting here to add prefix for offload > related functions? [Sugesh] Yes, would it be more readable that way?? > > >> + > >> +/* If a particular netdev class does not support offloading flows, > >> +all these > >> + * function pointers must be NULL. */ > >> + > >> + /* Deleting all offloaded flows from netdev */ > >> + int (*flow_flush)(struct netdev *); > >> + /* Dumping interface: > >> + * Usage is as with dpif_port_dump api (create, next, destory). > >> + * Create sets dump on success or returns error status on failure. */ > >> + int (*flow_dump_create)(struct netdev *, struct netdev_flow_dump > >> **dump); > >> + int (*flow_dump_destroy)(struct netdev_flow_dump *); > >> + /* rbuffer is for use of the implementation (e.g using nl_dump), > >> + * and is usually shared for the given thread that runs > flow_dump_next. > >> + * wbuffer is the buffer that dumped actions will be stored in, and > given > >> + * pointers to. */ > >> + 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); > >> + > >> + /* Offload the given flow (match, actions, stats, ufid) on netdev. > >> + * If stats isn't null, sets the given stats for that flow. > >> + * To modify the flow, use the same ufid. > >> + * actions are in netlink format, as with struct dpif_flow_put. > >> + * info is anything else that is need to offload the flow. */ > >> + int (*flow_put)(struct netdev *, struct match *, struct nlattr > >> *actions, > >> + size_t actions_len, struct dpif_flow_stats *, > >> + const ovs_u128 *ufid, struct offload_info *info); > >> + /* Queries the flow with specified ufid on netdev. > >> + * Fills match, actions, stats as with flow_dump_next */ > >> + int (*flow_get)(struct netdev *, struct match *, struct nlattr > >> **actions, > >> + struct dpif_flow_stats *, const ovs_u128 *ufid, > >> + struct ofpbuf *); > >> + /* Deletes the given flow specified by ufid from netdev. > >> + * If stats is not null, fills it with flow stats. */ > >> + int (*flow_del)(struct netdev *, struct dpif_flow_stats *, > >> + const ovs_u128 *ufid); > >> + /* Initializies the netdev flow api. */ > >> + int (*init_flow_api)(struct netdev *); > >> }; > >> > > ..... > >> 2.7.4 > > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev