Re: [PATCH] ip-nexthop: support flush by id

2021-03-31 Thread xuchunmei
Yes, I just refer to the support of protocol, not considering that id is unique. It is too heavy to get all. > 2021年3月31日 下午11:36,David Ahern 写道: > > On 3/31/21 5:53 AM, Ido Schimmel wrote: >>> @@ -124,6 +125,9 @@ static int flush_nexthop(struct nlmsghdr *nlh, void >>> *arg) >>> if (tb[NHA

Re: [PATCH] ip-nexthop: support flush by id

2021-03-31 Thread David Ahern
On 3/31/21 5:53 AM, Ido Schimmel wrote: >> @@ -124,6 +125,9 @@ static int flush_nexthop(struct nlmsghdr *nlh, void *arg) >> if (tb[NHA_ID]) >> id = rta_getattr_u32(tb[NHA_ID]); >> >> +if (filter.id && filter.id != id) >> +return 0; >> + >> if (id && !delete_

Re: [PATCH] ip-nexthop: support flush by id

2021-03-31 Thread Ido Schimmel
On Wed, Mar 31, 2021 at 10:22:34AM +0800, Chunmei Xu wrote: > add id to struct filter to record the 'id', > filter id only when id is set, otherwise flush all. > > Signed-off-by: Chunmei Xu > --- > ip/ipnexthop.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/

[PATCH] ip-nexthop: support flush by id

2021-03-30 Thread Chunmei Xu
add id to struct filter to record the 'id', filter id only when id is set, otherwise flush all. Signed-off-by: Chunmei Xu --- ip/ipnexthop.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ip/ipnexthop.c b/ip/ipnexthop.c index 22c66491..fd759140 100644 --- a/ip/ipnex