public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemming@brocade.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: <netdev@vger.kernel.org>, <phil@nwl.cc>
Subject: Re: [net-next PATCH iproute2 v2 1/1] tc: introduce IFE action
Date: Sun, 13 Mar 2016 23:26:51 -0700	[thread overview]
Message-ID: <20160313232651.354f6087@xeon-e3> (raw)
In-Reply-To: <1457525076-6923-2-git-send-email-jhs@emojatatu.com>

On Wed,  9 Mar 2016 07:04:36 -0500
Jamal Hadi Salim <jhs@mojatatu.com> wrote:

> +		fprintf(f, "\t Metadata: ");
> +
> +		if (metalist[IFE_META_SKBMARK]) {
> +			len = RTA_PAYLOAD(metalist[IFE_META_SKBMARK]);
> +			if (len) {
> +				__u32 *mmark = RTA_DATA(metalist[IFE_META_SKBMARK]);
> +				fprintf(f, "use mark %d ", *mmark);
> +			} else
> +				fprintf(f, "allow mark ");

This code has diverged way from the general rule that ip utilities display
format should match the command format. For example the properties shown
on "ip route show" match those of "ip route add".

Also over the last several years, the code in iproute2 has switched from casting
RTA_DATA() everywhere to a cleaner interface rte_getattr_u32() more like what
is used in mnl library.

The code has also gotten deeply intended creating lots of lines that are too long.

WARNING: 'doesnt' may be misspelled - perhaps 'doesn't'?
#21: 
then provide a default so the user doesnt have to specify it.

WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#25: 
            "Distributing Linux Traffic Control Classifier-Action Subsystem"

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#143: 
new file mode 100644

ERROR: "foo * bar" should be "foo *bar"
#378: FILE: tc/m_ife.c:231:
+static int print_ife(struct action_util *au, FILE * f, struct rtattr *arg)

WARNING: Missing a blank line after declarations
#384: FILE: tc/m_ife.c:237:
+	int has_optional = 0;
+	SPRINT_BUF(b1);

WARNING: Missing a blank line after declarations
#406: FILE: tc/m_ife.c:259:
+			struct tcf_t *tm = RTA_DATA(tb[TCA_IFE_TM]);
+			print_tm(f, tm);

WARNING: line over 80 characters
#449: FILE: tc/m_ife.c:302:
+				__u32 *mmark = RTA_DATA(metalist[IFE_META_SKBMARK]);

WARNING: Missing a blank line after declarations
#450: FILE: tc/m_ife.c:303:
+				__u32 *mmark = RTA_DATA(metalist[IFE_META_SKBMARK]);
+				fprintf(f, "use mark %d ", *mmark);

WARNING: line over 80 characters
#458: FILE: tc/m_ife.c:311:
+				__u32 *mhash = RTA_DATA(metalist[IFE_META_HASHID]);

WARNING: Missing a blank line after declarations
#459: FILE: tc/m_ife.c:312:
+				__u32 *mhash = RTA_DATA(metalist[IFE_META_HASHID]);
+				fprintf(f, "use hash %d ", *mhash);

WARNING: line over 80 characters
#467: FILE: tc/m_ife.c:320:
+				__u32 *mprio = RTA_DATA(metalist[IFE_META_PRIO]);

WARNING: Missing a blank line after declarations
#468: FILE: tc/m_ife.c:321:
+				__u32 *mprio = RTA_DATA(metalist[IFE_META_PRIO]);
+				fprintf(f, "use prio %d ", *mprio);

total: 1 errors, 11 warnings, 343 lines checked

  parent reply	other threads:[~2016-03-14  6:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 12:04 [net-next PATCH iproute2 v2 0/1] tc ife action Jamal Hadi Salim
2016-03-09 12:04 ` [net-next PATCH iproute2 v2 1/1] tc: introduce IFE action Jamal Hadi Salim
2016-03-09 13:12   ` Phil Sutter
2016-03-10 12:42     ` Jamal Hadi Salim
2016-03-10 13:12       ` Phil Sutter
2016-03-14  6:26   ` Stephen Hemminger [this message]
2016-04-21 21:27     ` Jamal Hadi Salim
     [not found]     ` <e6070b054b0748f48991187bb4ccfccd@HQ1WP-EXMB11.corp.brocade.com>
2016-04-21 21:36       ` Stephen Hemminger
2016-04-21 21:41         ` Jamal Hadi Salim
2016-04-21 22:09           ` Jamal Hadi Salim

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=20160313232651.354f6087@xeon-e3 \
    --to=shemming@brocade.com \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=phil@nwl.cc \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox