DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Ed Czeck <ed.czeck@atomicrules.com>
Cc: dev@dpdk.org, Shepard Siegel <shepard.siegel@atomicrules.com>,
	John Miller <john.miller@atomicrules.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/ark: poll-mode driver for AtomicRules Arkville
Date: Mon, 20 Mar 2017 15:25:52 -0700	[thread overview]
Message-ID: <20170320152552.690858c4@xeon-e3> (raw)
In-Reply-To: <1490044491-29286-1-git-send-email-ed.czeck@atomicrules.com>

On Mon, 20 Mar 2017 17:14:51 -0400
Ed Czeck <ed.czeck@atomicrules.com> wrote:

> +/* ************************************************************************* */
> +int
> +ark_ddm_verify(struct ark_ddm_t *ddm)
> +{
> +	if (sizeof(struct ark_ddm_t) != ARK_DDM_EXPECTED_SIZE) {
> +	fprintf(stderr, "  DDM structure looks incorrect %d vs %zd\n",
> +		ARK_DDM_EXPECTED_SIZE, sizeof(struct ark_ddm_t));
> +	return -1;
> +	}
> +
> +	if (ddm->cfg.const0 != ARK_DDM_CONST) {
> +	fprintf(stderr, "  DDM module not found as expected 0x%08x\n",
> +		ddm->cfg.const0);
> +	return -1;
> +	}
> +	return 0;
> +}
> +

You indentation is botched, either by your editor or mail client.
The DPDK format is same as Linux kernel:

That function should look like:

/* ************************************************************************* */
int
ark_ddm_verify(struct ark_ddm_t *ddm)
{
	if (sizeof(struct ark_ddm_t) != ARK_DDM_EXPECTED_SIZE) {
		fprintf(stderr, "  DDM structure looks incorrect %d vs %zd\n",
			ARK_DDM_EXPECTED_SIZE, sizeof(struct ark_ddm_t));
		return -1;
	}

	if (ddm->cfg.const0 != ARK_DDM_CONST) {
		fprintf(stderr, "  DDM module not found as expected 0x%08x\n",
			ddm->cfg.const0);
		return -1;
	}
	return 0;
}

Also drivers should not log to standard error but instead use the DPDK RTE logging
facility.

      reply	other threads:[~2017-03-20 22:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-20 21:14 Ed Czeck
2017-03-20 22:25 ` Stephen Hemminger [this message]

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=20170320152552.690858c4@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=ed.czeck@atomicrules.com \
    --cc=john.miller@atomicrules.com \
    --cc=shepard.siegel@atomicrules.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).