Re: [ovs-dev] [v6 4/9] netdev-linux: Add functions to manipulate tc police action

2022-07-07 Thread Jianbo Liu via dev
On Fri, 2022-07-08 at 09:38 +0800, Jianbo Liu wrote: > On Thu, 2022-07-07 at 14:02 +0200, Ilya Maximets wrote: > > On 7/7/22 13:51, Eelco Chaudron wrote: > > > On 2 Jul 2022, at 5:18, Jianbo Liu wrote: > > > > +static int > > > > +tc_update_policer_action_stats(struct ofpbuf *msg, > > > > +

Re: [ovs-dev] [v6 4/9] netdev-linux: Add functions to manipulate tc police action

2022-07-07 Thread Jianbo Liu via dev
On Thu, 2022-07-07 at 13:51 +0200, Eelco Chaudron wrote: > On 2 Jul 2022, at 5:18, Jianbo Liu wrote: > > > > +    tca = ofpbuf_at_assert(msg, NLMSG_HDRLEN, sizeof *tca); > > +    act = nl_attr_find(msg, NLMSG_HDRLEN + sizeof *tca, > > TCA_ACT_TAB); > > +    if (!act) { > > +    VLOG_ERR_RL(&r

Re: [ovs-dev] [v6 4/9] netdev-linux: Add functions to manipulate tc police action

2022-07-07 Thread Jianbo Liu via dev
On Thu, 2022-07-07 at 14:02 +0200, Ilya Maximets wrote: > On 7/7/22 13:51, Eelco Chaudron wrote: > > On 2 Jul 2022, at 5:18, Jianbo Liu wrote: > > > +static int > > > +tc_update_policer_action_stats(struct ofpbuf *msg, > > > +   struct ofputil_meter_stats > > > *stats) >

Re: [ovs-dev] [v6 4/9] netdev-linux: Add functions to manipulate tc police action

2022-07-07 Thread Ilya Maximets
On 7/7/22 13:51, Eelco Chaudron wrote: > On 2 Jul 2022, at 5:18, Jianbo Liu wrote: >> +static int >> +tc_update_policer_action_stats(struct ofpbuf *msg, >> + struct ofputil_meter_stats *stats) >> +{ >> +struct ovs_flow_stats stats_dropped = {0}; >> +struct ovs_

Re: [ovs-dev] [v6 4/9] netdev-linux: Add functions to manipulate tc police action

2022-07-07 Thread Eelco Chaudron
On 2 Jul 2022, at 5:18, Jianbo Liu wrote: > Add helpers to add, delete and get stats of police action with > the specified index. > > Signed-off-by: Jianbo Liu Two some small comments below... > --- > lib/netdev-linux.c | 144 + > lib/netdev-linux.h

Re: [ovs-dev] [v6 4/9] netdev-linux: Add functions to manipulate tc police action

2022-07-01 Thread 0-day Robot
Bleep bloop. Greetings Jianbo Liu, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. build: In file included from lib/packets.h:29:0, from lib/dp-packet.h:31, f

[ovs-dev] [v6 4/9] netdev-linux: Add functions to manipulate tc police action

2022-07-01 Thread Jianbo Liu via dev
Add helpers to add, delete and get stats of police action with the specified index. Signed-off-by: Jianbo Liu --- lib/netdev-linux.c | 144 + lib/netdev-linux.h | 6 ++ lib/tc.c | 118 + lib/tc.h