From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 765445F1B for ; Wed, 27 Feb 2019 19:30:48 +0100 (CET) Received: by mail-pf1-f196.google.com with SMTP id h1so8402947pfo.7 for ; Wed, 27 Feb 2019 10:30:48 -0800 (PST) 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=XyguFty06M9q/qQ3VLMTdyPaTAH0J6B5hBi1cUw9Ozg=; b=RfVEb0Um6o8l1WIvjDokaiB1lBbQAeg4AK5GfYM28UHPaY6JdwspRboy7TlkHof+/S XOCqz80xgsrYG3nuX2d3I29TJL5R/glMzgTgiWE1of7kq5WXZ1/dPh5gpnIAkoZGpFi2 zLnY8jhzy+26/FN4n4Wb2v47EIL2rfyAaPYeGRL0bZqsMMB5Viz/6m+7Du7uDgA6zgk5 MtUNmT9lzE1r+vok56ut6NGaopsrEc+822WjGx179ql29mbhYpQeXdg9iPm5p2473snp rnv/eyEy81QCkV4gZzvL9th5D8pPcheFOmMlmBacVSZSEKpXKaPRq+DH7YvbUaLuZmWT 6Cjw== 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=XyguFty06M9q/qQ3VLMTdyPaTAH0J6B5hBi1cUw9Ozg=; b=j/2XAtxsKzz8NWBren2T2wvS80n29fGX+sccs7A+OQZ2HFibHbeH47ytMepxVpq+C4 fKscjaxpWUlZLZ1QRETJI/LrUfFJM+DdtZfkwW1v3BCzE8LJPCmOyweTGDRd3L05gidp YxSpxSbHFUlN3hY4VpZhckOcyycdFjPIyMtnehBl3fwKwDUyfZ0w8yatdlQPaW4EO3cA ND/dvbC7NJZEy/I9Abs6VUphdUsx7Chl6C8GIXoXKne4xqrTETamaABqKwJ7H5cJ2hx3 wLh2vlrPgcW4VlE255Lyk3/gtRpgV7y4qp8CSbAxU46Lpr+AF7XmT/8GsAD50gVi6Ak0 r7zg== X-Gm-Message-State: AHQUAuZKqHrEDtfhQIlmDBSirsUzXeK1QZ/4HBFkMb2O2On7zktD76X6 f0STVHXbUey6W7KvasW9qGj+Em2HfNI= X-Google-Smtp-Source: AHgI3IZ85vvRudwOhPKy6MvHu5zb+pyb1ZI4jm+0usyRb/GXlGTOkgxXnzUbtIlACcwQ3CmbaIb9Ug== X-Received: by 2002:a63:1625:: with SMTP id w37mr4241988pgl.13.1551292247446; Wed, 27 Feb 2019 10:30:47 -0800 (PST) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id s80sm11421072pgs.4.2019.02.27.10.30.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Feb 2019 10:30:47 -0800 (PST) Date: Wed, 27 Feb 2019 10:30:43 -0800 From: Stephen Hemminger To: Andrew Rybchenko Cc: Ferruh Yigit , , Igor Romanov Message-ID: <20190227103043.3b62103b@shemminger-XPS-13-9360> In-Reply-To: References: <20190226213424.10567-1-stephen@networkplumber.org> <20190226213424.10567-6-stephen@networkplumber.org> <585db3f2-d9e6-1efd-b05f-7050758423a6@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH 5/5] sfc: don't use RTE_LOGTYPE_PMD 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: Wed, 27 Feb 2019 18:30:48 -0000 On Wed, 27 Feb 2019 14:24:21 +0300 Andrew Rybchenko wrote: > On 2/27/19 2:21 PM, Ferruh Yigit wrote: > > On 2/26/2019 9:34 PM, Stephen Hemminger wrote: =20 > >> The sfc driver was still using RTE_LOGTYPE_PMD which was superseded > >> by local logging. > >> > >> Signed-off-by: Stephen Hemminger > >> --- > >> drivers/net/sfc/sfc.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c > >> index 898603884fa0..2cd7126015fd 100644 > >> --- a/drivers/net/sfc/sfc.c > >> +++ b/drivers/net/sfc/sfc.c > >> @@ -1115,12 +1115,12 @@ sfc_register_logtype(const struct rte_pci_addr= *pci_addr, > >> ++lt_prefix_str_size; /* Reserve space for prefix separator */ > >> lt_str_size_max =3D lt_prefix_str_size + PCI_PRI_STR_SIZE + 1; > >> } else { > >> - return RTE_LOGTYPE_PMD; > >> + return sfc_logtype_driver; > >> } > >> =20 > >> lt_str =3D rte_zmalloc("logtype_str", lt_str_size_max, 0); > >> if (lt_str =3D=3D NULL) > >> - return RTE_LOGTYPE_PMD; > >> + return sfc_logtype_driver; > >> =20 > >> strncpy(lt_str, lt_prefix_str, lt_prefix_str_size); > >> lt_str[lt_prefix_str_size - 1] =3D '.'; > >> =20 > > Overall I think it is good idea to remove RTE_LOGTYPE_PMD, but sfc has = a few > > more usage of it around same manner, as a fallback value if allocating = dynamic > > one fails. > > > > > > Andrew, > > > > Can be possible to update this sfc patch to completely eliminate RTE_LO= GTYPE_PMD > > usage? What do you think? > > > > Thanks, > > ferruh =20 >=20 > I'm OK to use=C2=A0 sfc_logtype_driverif dynamic log type register fails,= but > what should I do if sfc_logtype_driverregister fails? >=20 > Andrew. I don't like drivers that try to do something different than every other dr= iver in DPDK. The solarflare driver is doing lots of extra effort to have multiple fine g= rain log types. Not sure if there is any value to this. In a real world situation for diagn= osis you would want to turn on logs across everything in the driver, then filter as needed= later.