Re: [PATCH iproute2 1/1] actions: Add support for user cookies

2017-11-23 Thread Stephen Hemminger
On Sat, 22 Apr 2017 08:36:23 -0400 Jamal Hadi Salim wrote: > + > fprintf(f, "\tAction statistics:\n"); > print_tcstats2_attr(f, tb[TCA_ACT_STATS], "\t", NULL); > + if (tb[TCA_ACT_COOKIE]) { > + int strsz =

Re: [PATCH iproute2 1/1] actions: Add support for user cookies

2017-11-23 Thread Stephen Hemminger
On Sat, 22 Apr 2017 08:36:23 -0400 Jamal Hadi Salim wrote: > + > + if (*argv && strcmp(*argv, "cookie") == 0) { > + size_t slen; > + > + NEXT_ARG(); > + slen =

Re: [PATCH iproute2 1/1] actions: Add support for user cookies

2017-11-23 Thread Jiri Pirko
Thu, Nov 23, 2017 at 06:32:38PM CET, j...@mojatatu.com wrote: >On 17-11-23 11:36 AM, Jiri Pirko wrote: >> Sat, Apr 22, 2017 at 02:36:23PM CEST, j...@mojatatu.com wrote: >> >> [...] >> > >[..] >> >> Jamal, is there any particular reason that you print cookie only in case >> you show stats? What

Re: [PATCH iproute2 1/1] actions: Add support for user cookies

2017-11-23 Thread Jamal Hadi Salim
On 17-11-23 11:36 AM, Jiri Pirko wrote: Sat, Apr 22, 2017 at 02:36:23PM CEST, j...@mojatatu.com wrote: [...] [..] Jamal, is there any particular reason that you print cookie only in case you show stats? What is the relation between cookie and stats? -s has been thus far used to imply

Re: [PATCH iproute2 1/1] actions: Add support for user cookies

2017-11-23 Thread Jiri Pirko
Sat, Apr 22, 2017 at 02:36:23PM CEST, j...@mojatatu.com wrote: [...] >@@ -274,8 +302,17 @@ tc_print_one_action(FILE *f, struct rtattr *arg) > return err; > > if (show_stats && tb[TCA_ACT_STATS]) { >+ > fprintf(f, "\tAction statistics:\n"); >

Re: [PATCH iproute2 1/1] actions: Add support for user cookies

2017-04-23 Thread Jamal Hadi Salim
On 17-04-23 12:11 PM, Stephen Hemminger wrote: On Sat, 22 Apr 2017 08:36:23 -0400 Applied. Please update man page as well. Will do. cheers, jamal

Re: [PATCH iproute2 1/1] actions: Add support for user cookies

2017-04-23 Thread Stephen Hemminger
On Sat, 22 Apr 2017 08:36:23 -0400 Jamal Hadi Salim wrote: > From: Jamal Hadi Salim > > Make use of 128b user cookies > > Introduce optional 128-bit action cookie. > Like all other cookie schemes in the networking world (eg in protocols > like http or

[PATCH iproute2 1/1] actions: Add support for user cookies

2017-04-22 Thread Jamal Hadi Salim
From: Jamal Hadi Salim Make use of 128b user cookies Introduce optional 128-bit action cookie. Like all other cookie schemes in the networking world (eg in protocols like http or existing kernel fib protocol field, etc) the idea is to save user state that when retrieved

Re: [PATCH iproute2 1/1] actions: Add support for user cookies

2017-03-21 Thread Stephen Hemminger
Minor style issues. > + if (*argv && strcmp(*argv, "cookie") == 0) { > + int slen; slen is strlen() and that returns size_t not int. > + > + NEXT_ARG(); > + slen = strlen(*argv); > +

[PATCH iproute2 1/1] actions: Add support for user cookies

2017-03-21 Thread Jamal Hadi Salim
From: Jamal Hadi Salim Make use of 128b user cookies Introduce optional 128-bit action cookie. Like all other cookie schemes in the networking world (eg in protocols like http or existing kernel fib protocol field, etc) the idea is to save user state that when retrieved