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 34DFF42B2C; Wed, 17 May 2023 16:53:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26E9D41611; Wed, 17 May 2023 16:53:00 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 08CE340041 for ; Wed, 17 May 2023 16:52:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P4Tpsu+z3mPYNluGr3sqhyOkEW5DteDE+9enmHe3G1/RSS8+sfzCAr+ATmFWj0M+3ObUo/B0+yaLQ8SS9972+3WIcKon9XSObNV8ZvL/TevlBCzKvMVMFdu4v4KInwRuVXDUpnj5ScnLxaBloSD9/7TWi7ZTeYAsDVUil+n1W9m+uMe7orKfPfsMl0K6h9dR6BtVAr0bv7dw2z+dZaGXgobn5N/NVL4ZeGO5yQz61v6f4a14WG7qfazbSQQG87lBCEAzDZmhm4bzt4vtO1iTLSONjKSzZDz567jkhf1rEu2pmjGd4nq6uTqK9rP+yE8gXQk78kOZb/pPL9I+YEQSzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=H3YYDuDt2jAax5Ai1sEB3lngSmSMdZGNz10RPvD8XCg=; b=g+RxqLy3gmiMUfl5AmdSEbGqT/eNvJYiPM4EIwlXgsu++XAizMmgWXFaRmLKv123vCElBh+IzVsblSv/A3PFQy3g84QrPNBI+XR5kqMxYw2FhFnVSTLE2X4S93iVCpak375FjwubvMRbWaltgPb3H2eAuO3HgTjYBvStKJlvl/4D7RF8jpW+u4+aCsCrUssBJUqK8XwgYt537/HUkJ0GbuNpyAEwVGG5FmLWwzhOjNm2hZpEkafvPsHVMOP51NKvf5UvSiOLiowgk/TNPw6KT3OYExewnoS/DbqAA/uJxHw14Bb2xK/nWF0mR4EUFUX5m6bxiiXiAjXoXeDAL8OEkw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H3YYDuDt2jAax5Ai1sEB3lngSmSMdZGNz10RPvD8XCg=; b=lKY4gMwMQ5Ax2J/Qr7bmX/pxIXA+tXe2F2Am5FO60raCCGPDBpdbi/txTLqSsuIQSkCu9TelNlxU2hDq7vr86k5CS0kqwLz9BHmPe75b3aZYOmzqWNxBzVmnD9bmGfBZQrdLvC31Tt8aMApw3kzCpYCQSGPAaPI79j+0/xlCrAk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by MW4PR12MB6684.namprd12.prod.outlook.com (2603:10b6:303:1ee::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.33; Wed, 17 May 2023 14:52:55 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::7957:641d:6aba:3f9a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::7957:641d:6aba:3f9a%4]) with mapi id 15.20.6387.033; Wed, 17 May 2023 14:52:55 +0000 Message-ID: <3e3ad8c1-25d2-4a85-3e5e-b42ef207d3d4@amd.com> Date: Wed, 17 May 2023 15:52:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: Stephen Hemminger , David Marchand Cc: dev@dpdk.org, Thomas Monjalon , Andrew Rybchenko References: <20230309081633.780438-1-david.marchand@redhat.com> <20230309082111.565105bf@hermes.local> From: Ferruh Yigit Subject: Re: [PATCH] ethdev: prefer offload names in logs In-Reply-To: <20230309082111.565105bf@hermes.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0547.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:319::16) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|MW4PR12MB6684:EE_ X-MS-Office365-Filtering-Correlation-Id: decff491-ba9f-46af-6e73-08db56e665a6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: firYmNujO8GJsNPqCLLXbq6+dk+LCrWMa9uLna3YNrJxP6TTa9uwj801pJ7PreBnq3bkMcp981VRg5c0yATr3rW4N949zh+YZiM4u1ymfAN3+KtBxe/4fka/tp7YPPsMd26g1vb6PtiVAbX+U9T+JqXjKG+eu5QwBUxb93LXTE5+mGq03IYZ1UbCdZLud5za0l9AH/DnIbGcTKXngwdatQbC4w92YuI2fa4RRm/h8f0rOtnOaprn8c2JU3u7lszpQchWhfCXq4NjlIABxyXDeFgIYJ3tth+xcweB1ylZfGhEQZbnPwRdirtr4KvUypOYQTEvnALNlqvMvljgqJRsdiUyui95mUsvwqW6dXKLuQHkev2niQ15AJGUoYAKZdDnOt04JkkRk/Z6MsMiK/DuW3uEf9LEd6nQMjyC1DjngPl7ssooXIyxx5IYvPhzpQNMVu7+sKhjZZKH5UW/SWIlqHgYUf6DNQve/l4vF4vl8tKtuScsiK3cpLBxcNUHoqJoHKQSg7cehqrnHiaLFmFPHvQM0Z9/H60ikM40fG7AcnZRs1TOs/fI0xdlcOxHK6JX3qAGKVOdqbGNrNj5kBhGMsglcAlviPf54Fpw0HeQ6dqa+wKGgdEF72FfkMblZ7hfobXxLdiGw8j66VStx1kHgA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(366004)(136003)(39860400002)(346002)(376002)(451199021)(36756003)(6486002)(4326008)(110136005)(54906003)(316002)(86362001)(66946007)(66476007)(66556008)(478600001)(6666004)(5660300002)(41300700001)(8676002)(44832011)(2906002)(8936002)(31696002)(38100700002)(6512007)(26005)(186003)(53546011)(6506007)(83380400001)(2616005)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aHdvRXY1VFlWQ2VWNjZqWCtjUTI3OXloOSsrRGkxcjk1cWdMUHAwSW9kbnZm?= =?utf-8?B?ZTlJYXJHVUt2aEdZNk5pS1k2cVd5amxnOHFVZWpxR1VNbEpIY2NyVnVReHJp?= =?utf-8?B?UXhPRFg2U1NYY3dlUm9iZlh2WkVlbjNISm5uOFN4aUswcEQ5bmc1UFBRdXMv?= =?utf-8?B?NkVRZ09lWExrVHRqOWs2WDJIeFd3V091aVhPSUNNZ0RTODhGUkd2RWYzYnps?= =?utf-8?B?M0tmMjlaL2dkd3BMYjhXSFhta1cvS21WRFpLSGxLVU5peEdoa1VJNzk3S01Z?= =?utf-8?B?YlhmclJRQXdYL25QVFdVWlBRbnFLYlhmYXI1OWdkZ1FXZ0dVeHdLOFk5Y3ly?= =?utf-8?B?aUdFaDlrKzFTTGZiVTVpb2NaWTZEQms4Nk5CRnppc1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9f-46af-6e73-08db56e665a6 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2023 14:52:55.3592 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /oS8HwadRQpY91Va0PAg8BNa1VBM+pKwo3IxmEQ7q1GEVMURoVlDdm2Cijnsrai1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6684 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 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=%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.