From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WPwR/e/MMWu8xpnMWBpzpY+lJp5f/NGDD00uBj0Q3Zk=; b=b+q5y/WmuF+FdX5sbnFyITHmlK8fzJtDtPt3ytqxdApGbO2cGjP98hzU2SfyrDA6hB 9k50LZM6SfW2GK4uBfVM7kDbB9A0+WuSXSJeveu94TbCgnyd3eDveHhug4uyRiBBvP12 9iqxUE0wU+vmKEAEv5pZ5TXOykCRieE4JsTHlykUsRH8mRER/1XseGTps13jJut6E0CC i+MmeVStJHw3SNnsTONsPYx+u4bQPEsA/BrH+BU1/6ZgBELrXEHn3HfoE3z3Tfe6Wsvd 5Xvix4Xqh+o31Fc4cFJgDc2SbyHVHgZ9fAe5XIqFMcOzkXabb/aDJF29cAV+y5bJs3sp RLOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WPwR/e/MMWu8xpnMWBpzpY+lJp5f/NGDD00uBj0Q3Zk=; b=pz0J4nmUuvH8iCIQCXiZ5/iZqc9N1dAPKFMXgwJFhT4mJGxsn2FU4YSrJT4TmmBi6J LLAt2gIFrxeogVzkQZvDoanzl1t2PU59yLjecFvwztisdZOZi4IpPm4tehX/yjZDAMbP IyO7HsUBechIX47HsJtyYyAisJPU9USPZPcwrmTTwY0MgvT8A5dtPKzAlxDVI4kWimA8 /hB41rGcChMukSUKU62fG/Z0YdhXi3Yf91lRDO/OJrJLiG4bya5m6GPMFk+wS75bkpEf 1On1JmFk8GPTSbys7Yo/JFS5ydaDXzNFbjyYZwx4eesV/mT/FjFFJ9ZFmgkn+ajZ8H4X Hx4g== X-Gm-Message-State: AFeK/H1X5upuXsPN9MFmyC6uzuNTMd8Izeby4RwBR3xbBirMB3u2zqCmAtpB/Enf/koSeg== X-Received: by 10.99.157.6 with SMTP id i6mr18685586pgd.87.1490048759141; Mon, 20 Mar 2017 15:25:59 -0700 (PDT) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id z19sm19418193pfd.81.2017.03.20.15.25.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Mar 2017 15:25:59 -0700 (PDT) Date: Mon, 20 Mar 2017 15:25:52 -0700 From: Stephen Hemminger To: Ed Czeck Cc: dev@dpdk.org, Shepard Siegel , John Miller Message-ID: <20170320152552.690858c4@xeon-e3> In-Reply-To: <1490044491-29286-1-git-send-email-ed.czeck@atomicrules.com> 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 Subject: Re: [dpdk-dev] [PATCH v2] net/ark: poll-mode driver for AtomicRules Arkville X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2017 22:26:00 -0000 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.