From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0DD5BA04E6; Wed, 9 Dec 2020 15:45:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E7861BE75; Wed, 9 Dec 2020 15:45:06 +0100 (CET) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 3F7EF2B8B for ; Wed, 9 Dec 2020 15:45:05 +0100 (CET) Received: by mail-pg1-f196.google.com with SMTP id t3so1299444pgi.11 for ; Wed, 09 Dec 2020 06:45:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=RXONXccQp/GAOeEXoJ7tE8aFvwPHitJs2t86mYtlwlU=; b=3XU8KCiv7Gw9m0ZI74U6Wd6DPVs+Rh8ph/YnOu7NFlqzzE5VP1R9EtdIE9RSdpuVBI stFW3YDmQlirJMWOqOe1UQ2rhFSDX/ubcP7E5696AaMGs+w67esF8sQF4USh6fF4kj8H 8LTwAiV4pZnf7RxamKTlBfQJGjL9NafYYleaBDWBxfBlO2ERJokyxgwCupUSagg7LHn0 dU+yPrPRJpo9lpXpSxmOT6OCfp5ASbtkGqeyt/bAxyPTvDsO/3ezKWSlpMuHDkXG5za0 irLnOtXIn2h3p+3YICcLQ1TpkT0My+fPtCgfVkQiigyfkOIJi49rTpfruyGDQKMa+erV JqqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=RXONXccQp/GAOeEXoJ7tE8aFvwPHitJs2t86mYtlwlU=; b=Yjc8bBe/FfQ03LBK5Cjp9u7bcahSaGYI7u7OvyV9qAkNL/18cI5E57RcTC0RD4MZiM YFQc1q7qOYcYUZPGclEmrgBlZywd8pygaAhcwqwOX907nCz1AXyNSIKIuKvF8XIKj0eL lwyWTyZxfx3LLVLj1wNAnxtVbKMeYZLlF4oA3zRYDal9+sYeFB4q2GENrY53so5tNYFA x8sVrzJXjEFg/FOTy4eRN7LB+lSZTQNz4psbbI1MgRkMW/pOhprJXGASQlSFv8IIoKyy n80phLs3blKKgMU3nRyQua8TUU8bki3+Nq+RnsvFpaaku+q8HtPWkbr2r0jkttAofQDv mC0g== X-Gm-Message-State: AOAM533QjZKSZQK5rRiyUGzAK1AAnkYhLZ0eMM24SbLY+nUtu28yqLwW TYEqV1CmEBcov9ypA52JDWjsPA== X-Google-Smtp-Source: ABdhPJzh8VM/AcA7EUDuZPDY89JErL9E+q7Y/emK0G7pEr6RbTTDv9Gs+kY8kx6xmZPdtNSjfju0Cg== X-Received: by 2002:a63:df4a:: with SMTP id h10mr2155247pgj.25.1607525103405; Wed, 09 Dec 2020 06:45:03 -0800 (PST) Received: from ?IPv6:2600:1700:6b0:fde0:a173:9ff1:703a:6171? ([2600:1700:6b0:fde0:a173:9ff1:703a:6171]) by smtp.gmail.com with ESMTPSA id p1sm3080720pfb.208.2020.12.09.06.45.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Dec 2020 06:45:02 -0800 (PST) From: Andrew Boyer Message-Id: Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Date: Wed, 9 Dec 2020 09:45:01 -0500 In-Reply-To: <5febeda3-f733-303c-0a13-6e9f1dfe4306@intel.com> Cc: dev@dpdk.org, Alfredo Cardigliano To: Ferruh Yigit References: <20201203203418.15064-1-aboyer@pensando.io> <20201204201646.51746-10-aboyer@pensando.io> <5febeda3-f733-303c-0a13-6e9f1dfe4306@intel.com> X-Mailer: Apple Mail (2.3608.120.23.2.4) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3 9/9] net/ionic: minor logging fixups 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > On Dec 9, 2020, at 8:47 AM, Ferruh Yigit = wrote: >=20 > On 12/4/2020 8:16 PM, Andrew Boyer wrote: >> Expose ionic_opcode_to_str() so it can be used for dev cmds, too. >> Store the device name in struct adapter. >> Switch to memcpy() to work around gcc false positives. >> Signed-off-by: Andrew Boyer >> --- >> drivers/net/ionic/ionic.h | 1 + >> drivers/net/ionic/ionic_dev.c | 5 +++ >> drivers/net/ionic/ionic_dev.h | 2 + >> drivers/net/ionic/ionic_ethdev.c | 4 +- >> drivers/net/ionic/ionic_lif.c | 68 = ++++++++++++++++--------------- >> drivers/net/ionic/ionic_mac_api.c | 4 +- >> drivers/net/ionic/ionic_main.c | 32 ++++++++------- >> drivers/net/ionic/ionic_rxtx.c | 41 ++++++++----------- >> 8 files changed, 84 insertions(+), 73 deletions(-) >=20 > <...> >=20 >> @@ -1217,12 +1221,11 @@ ionic_lif_notifyq_init(struct ionic_lif *lif) >> } >> }; >> - IONIC_PRINT(DEBUG, "notifyq_init.index %d", >> - ctx.cmd.q_init.index); >> - IONIC_PRINT(DEBUG, "notifyq_init.ring_base 0x%" PRIx64 "", >> - ctx.cmd.q_init.ring_base); >> + IONIC_PRINT(DEBUG, "notifyq_init.index %d", q->index); >> + IONIC_PRINT(DEBUG, "notifyq_init.ring_base %#jx", q->base_pa); >=20 > There are lots of similar PRIx64 -> %j change in this patch, > '%j' specifier is for 'intmax_t' and which seems 64bit storage, so = this should work with 64 bit variable 'q->base_pa', > but the variable is explicitly uint64_t why replacing 'PRIx64' usage = which is correct and more common usage in the DPDK? Why ionic is want to = do this in its own way, I am not clear of the motivation of these = changes really, can you please clarify? As best I know, I am following the (two different) contribute guidelines = pages, both of which direct submitters to run checkpatch. One of things = checkpatch flags is lines over 80 columns. Many of these lines were over = 80 columns or oddly broken to meet the 80 column limit. %j is used in many other places in this PMD - as originally written by = Alfredo, one of your core contributors. If we are allowed to use %j, I = want to, since I much prefer it to the hideous PRIx64. > <...> >=20 >> @@ -1448,8 +1450,9 @@ ionic_lif_set_name(struct ionic_lif *lif) >> }, >> }; >> - snprintf(ctx.cmd.lif_setattr.name, = sizeof(ctx.cmd.lif_setattr.name), >> - "%d", lif->port_id); >> + /* FW is responsible for NULL terminating this field */ >> + memcpy(ctx.cmd.lif_setattr.name, lif->name, >> + sizeof(ctx.cmd.lif_setattr.name)); >=20 > Even though FW may be guaranting the string will be null terminated, = won't it be nice to provide input as null terminated if this is the = expectation? No, that is not the expectation. We prefer it to be this way. -Andrew