From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v2] net/ark: poll-mode driver for AtomicRules Arkville Date: Mon, 20 Mar 2017 15:25:52 -0700 Message-ID: <20170320152552.690858c4@xeon-e3> References: <1490044491-29286-1-git-send-email-ed.czeck@atomicrules.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Shepard Siegel , John Miller To: Ed Czeck Return-path: Received: from mail-pf0-f172.google.com (mail-pf0-f172.google.com [209.85.192.172]) by dpdk.org (Postfix) with ESMTP id EFCD7133F for ; Mon, 20 Mar 2017 23:25:59 +0100 (CET) Received: by mail-pf0-f172.google.com with SMTP id 20so23720469pfk.2 for ; Mon, 20 Mar 2017 15:25:59 -0700 (PDT) In-Reply-To: <1490044491-29286-1-git-send-email-ed.czeck@atomicrules.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 20 Mar 2017 17:14:51 -0400 Ed Czeck 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.