From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 06C2542CA9; Tue, 13 Jun 2023 15:07:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E9DC40A8A; Tue, 13 Jun 2023 15:07:31 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 42E5540698 for ; Tue, 13 Jun 2023 15:07:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686661649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/CJMsfee/iMOieLtuleLMYK3l15OC+RbQ9uhcj0be1Q=; b=CinW8owXeWJJ3QmUhwR8CCUkK1FIxpIezeyEihFp2g4gIQ5HjwEh7TKYSDixgvYPz9qEeZ IaD3R0UsfRNP+vAA3BUbowCqE8WHNdUssqKd1ESgVLTYysm1hCRV+p/N1/xJoAagPFwuHM ncNYXXlBQBK+L3a7Tmby+Vw02FWQYFw= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-344-h3dV-xVVPzSzliaED-zDNA-1; Tue, 13 Jun 2023 09:07:28 -0400 X-MC-Unique: h3dV-xVVPzSzliaED-zDNA-1 Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-25bf7e8bcd4so957289a91.2 for ; Tue, 13 Jun 2023 06:07:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686661647; x=1689253647; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/CJMsfee/iMOieLtuleLMYK3l15OC+RbQ9uhcj0be1Q=; b=SlqoI/0RqEpsEBqitLOdM+UQTz+K5/9dhwHDYOtiB1AurSBLDv5sA2oS+xRpebKKy/ XxTKX+r105w7hWxGhO958rPTCmDMhzuqXghAbYrwhfRnO/HTEsWS96dIHUuxyPsAXFO1 N/Eu4aGiJPdq9o86q9E/bsuj7c0wmdEsskdiFwtyXNXYh74j+83dULV3f4ovi2TnNjPB Cu7pFnmFG3MFWKzHCrvP6+RMseVOom/d4CqlI56jDp6RfqMLZw0AGFm9pbM78uxWJkLO LOx/DOGDqaNN7ERT5p7mr1j1QFfnohlDjTijE4ar8xekqv55vj7ZYAzosFi84haaLOm0 RjWw== X-Gm-Message-State: AC+VfDyu2Kjh8gD3gnqhCpwn3ZHQ2d4SPdGvEvV9sK0NDvwktwFHY9xD thwG6OnmjnQkxEjHhNq/MnTz5yIIPtxwqYGNaSNE69MLQRvtHsaktl7+6WpqAI0kyDNlwrpb7ru tBPLyUoMRfRhh5Omqbro= X-Received: by 2002:a17:90a:f195:b0:25b:e624:986b with SMTP id bv21-20020a17090af19500b0025be624986bmr4646518pjb.31.1686661647423; Tue, 13 Jun 2023 06:07:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6jz6ZrY3gkp1Gl/YM6z+RbtMyblSBQ2y+4363Xnm5fR2PhpIi9G0cvx9l7l9WDSVZMFmurrJH8hQFQlCOzC1k= X-Received: by 2002:a17:90a:f195:b0:25b:e624:986b with SMTP id bv21-20020a17090af19500b0025be624986bmr4646502pjb.31.1686661647164; Tue, 13 Jun 2023 06:07:27 -0700 (PDT) MIME-Version: 1.0 References: <20230309081633.780438-1-david.marchand@redhat.com> <20230309082111.565105bf@hermes.local> <3e3ad8c1-25d2-4a85-3e5e-b42ef207d3d4@amd.com> In-Reply-To: <3e3ad8c1-25d2-4a85-3e5e-b42ef207d3d4@amd.com> From: David Marchand Date: Tue, 13 Jun 2023 15:07:15 +0200 Message-ID: Subject: Re: [PATCH] ethdev: prefer offload names in logs To: Ferruh Yigit Cc: Stephen Hemminger , dev@dpdk.org, Thomas Monjalon , Andrew Rybchenko X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, May 17, 2023 at 4:53=E2=80=AFPM Ferruh Yigit = wrote: > > On 3/9/2023 4:21 PM, Stephen Hemminger wrote: > > On Thu, 9 Mar 2023 09:16:33 +0100 > > David Marchand wrote: > > > >> + RTE_ETHDEV_LOG(ERR, "Ethdev port_id=3D%u requested Rx off= loads '%s' in %s(). " > >> + "Device supports '%s' Rx offloads but does not su= pport '%s'.\n", > >> + port_id, requested !=3D NULL ? requested : "N/A",= __func__, > >> + available !=3D NULL ? available : "N/A", > >> + unavailable !=3D NULL ? unavailable : "N/A"); > >> + free(requested); > > > > Please shorten message and make sure it does not cross line boundaries. > > Best to allow users to do simple search for message. > > Agree that using offload names are more user friendly. > > To keep the log more reasonable length, what would you think to split > into two, one in ERR level other is in info/debug: > ERR, "Ethdev port_id=3D%u does not support '%s'.\n", unavailable > DEBUG, "Ethdev port_id=3D%u requested Rx offloads '%s', device supports > '%s'.\n", requested, available > > And I think we can drop __func__, we don't use in many other logs anyway. Splitting seems the simpler and won't require an application involvement. I would even split the debug message in two (after all, if we have two logs, why not three :-)). I'll also revisit the patch wrt allocations. > > > > Other option can be to provide APIs to print all offloads (similar to > 'rte_eth_dev_tx_offload_name()'), so application does its own logging, > and ethdev just prints 'unavailable' part of the log. > --=20 David Marchand