From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: Re: [PATCH] ethdev: prefer offload names in logs
Date: Wed, 17 May 2023 15:52:49 +0100 [thread overview]
Message-ID: <3e3ad8c1-25d2-4a85-3e5e-b42ef207d3d4@amd.com> (raw)
In-Reply-To: <20230309082111.565105bf@hermes.local>
On 3/9/2023 4:21 PM, Stephen Hemminger wrote:
> On Thu, 9 Mar 2023 09:16:33 +0100
> David Marchand <david.marchand@redhat.com> wrote:
>
>> + RTE_ETHDEV_LOG(ERR, "Ethdev port_id=%u requested Rx offloads '%s' in %s(). "
>> + "Device supports '%s' Rx offloads but does not support '%s'.\n",
>> + port_id, requested != NULL ? requested : "N/A", __func__,
>> + available != NULL ? available : "N/A",
>> + unavailable != 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=%u does not support '%s'.\n", unavailable
DEBUG, "Ethdev port_id=%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.
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.
next prev parent reply other threads:[~2023-05-17 14:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 8:16 David Marchand
2023-03-09 16:21 ` Stephen Hemminger
2023-05-17 14:52 ` Ferruh Yigit [this message]
2023-06-13 13:07 ` David Marchand
2023-05-17 14:52 ` Ferruh Yigit
2023-06-13 13:24 ` [PATCH v2] " David Marchand
2023-06-13 16:37 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e3ad8c1-25d2-4a85-3e5e-b42ef207d3d4@amd.com \
--to=ferruh.yigit@amd.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).