On Fri, Apr 21, 2023 at 05:16:50PM +0200, Adrian Moreno wrote: > In preparation for supporting 64-bit rates in tc policies, move the > allocation and initialization of struct tc_police object inside > nl_msg_put_act_police(). That way, the function is now called with the > actual rates. > > Signed-off-by: Adrian Moreno <amore...@redhat.com>
Tested-by: Simon Horman <simon.hor...@corigine.com> > --- > lib/netdev-linux.c | 37 ++++++++++++++++++------------------- > 1 file changed, 18 insertions(+), 19 deletions(-) > > diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c > index 8ee75981b..a2bae300c 100644 > --- a/lib/netdev-linux.c > +++ b/lib/netdev-linux.c > @@ -2653,21 +2653,26 @@ nl_msg_act_police_end_nest(struct ofpbuf *request, > size_t offset, > } > > static void > -nl_msg_put_act_police(struct ofpbuf *request, struct tc_police *police, > +nl_msg_put_act_police(struct ofpbuf *request, uint32_t index, > + uint64_t kbits_rate, uint64_t kbits_burst, > uint64_t pkts_rate, uint64_t pkts_burst, > uint32_t notexceed_act, bool single_action) nit: not that I have a good idea of a better approach, but this has a lot of parameters now :( _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev