All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Mashak <mrv@mojatatu.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
	davem@davemloft.net, netdev@vger.kernel.org,
	eric.dumazet@gmail.com, xiyou.wangcong@gmail.com
Subject: Re: [PATCH net-next v4 1/2] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch
Date: Wed, 19 Apr 2017 08:55:57 -0400	[thread overview]
Message-ID: <85shl4o8te.fsf@mojatatu.com> (raw)
In-Reply-To: <20170419123645.GB3357@nanopsycho.orion> (Jiri Pirko's message of "Wed, 19 Apr 2017 14:36:45 +0200")

Jiri Pirko <jiri@resnulli.us> writes:


[...]

>>+enum {
>>+	TCAA_UNSPEC,
>>+	TCAA_ACT_TAB,
>>+	TCAA_ACT_FLAGS,
>>+	TCAA_ACT_COUNT,
>>+	__TCAA_MAX
>>+};
>>+
>>+#define TCAA_MAX (__TCAA_MAX - 1)
>> #define TA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg))))
>> #define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg))
>>-#define TCA_ACT_TAB 1 /* attr type must be >=1 */	
>>-#define TCAA_MAX 1
>>+#define TCA_ACT_TAB TCAA_ACT_TAB
>
> This is mess. What does "TCAA" stand for?
> I suggest some more meaningful naming of the enum items and define
> TCA_ACT_TAB and TCAA_MAX to the new values in order to maintain UAPI
> Also, please put X_MAX = __X_MAX - 1 into enum
>

Notation observed in tc and unfortunately not consistently maintained is
to have enum with TCA* attributes for instance, followed by define,
outside of the enum, with __X_MAX -1

[...]

  reply	other threads:[~2017-04-19 12:56 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 11:57 [PATCH net-next v4 1/2] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch Jamal Hadi Salim
2017-04-19 11:57 ` [PATCH net-next v4 2/2] net sched actions: add time filter for action dumping Jamal Hadi Salim
2017-04-19 12:53   ` Jiri Pirko
2017-04-19 13:11     ` Jamal Hadi Salim
2017-04-19 14:14       ` Jiri Pirko
2017-04-19 15:47         ` Jamal Hadi Salim
2017-04-19 15:55           ` Jiri Pirko
2017-04-19 12:36 ` [PATCH net-next v4 1/2] net sched actions: dump more than TCA_ACT_MAX_PRIO actions per batch Jiri Pirko
2017-04-19 12:55   ` Roman Mashak [this message]
2017-04-19 13:05     ` Jiri Pirko
2017-04-19 13:03   ` Jamal Hadi Salim
2017-04-19 13:13     ` Jiri Pirko
2017-04-19 15:37       ` Jamal Hadi Salim
2017-04-19 15:54         ` Jiri Pirko
2017-04-19 16:07           ` Jamal Hadi Salim
2017-04-19 16:17             ` Jiri Pirko
2017-04-20 10:42               ` Jamal Hadi Salim
2017-04-20 11:35                 ` Jiri Pirko
2017-04-20 14:03                   ` Jamal Hadi Salim
2017-04-20 12:18                 ` Eric Dumazet
2017-04-20 13:27                   ` Jamal Hadi Salim
2017-04-20 15:50                     ` David Miller
2017-04-20 17:38                       ` Jamal Hadi Salim
2017-04-20 17:58                         ` David Miller
2017-04-21 10:36                           ` Jamal Hadi Salim
2017-04-21 14:51                             ` David Miller
2017-04-21 15:29                               ` Jamal Hadi Salim
2017-04-21 15:38                                 ` David Miller
2017-04-21 15:55                                   ` Jamal Hadi Salim
2017-04-21 16:01                                     ` Jamal Hadi Salim
2017-04-21 16:12                                       ` David Miller
2017-04-21 18:11                                         ` Jamal Hadi Salim
2017-04-22 11:30                                           ` Jamal Hadi Salim
2017-04-24  9:27                                           ` Simon Horman
2017-04-24 12:54                                             ` Jamal Hadi Salim
2017-04-21 16:11                                     ` David Miller
2017-04-20 15:23                   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85shl4o8te.fsf@mojatatu.com \
    --to=mrv@mojatatu.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.