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 59F8C41D52 for ; Thu, 23 Feb 2023 15:07:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E94843203; Thu, 23 Feb 2023 15:07:41 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2085.outbound.protection.outlook.com [40.107.243.85]) by mails.dpdk.org (Postfix) with ESMTP id E10C043196; Thu, 23 Feb 2023 15:07:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WNmK1WL0UyL40sW2E/ZNvQPYqfGUBMneLwkneh60Rsy2MfH+2//jKRAitSwbhd9DLzcOxMYzhx5QJceTr1bQ7vD5874by4XOqBdYsF7aLE6JrnolhBYI08CXJ4di1ZQcwrSGbBxIie96b1QgCYowHcy1sv3ZfbK5IIZiS+HPtqgyOHUtbPNMSQ7lOzC8yi60fON0hRLUYCHQc8GLy6pSScpqCpLwQ1H7DASWRUWCd+WO80DE8jFNdeMBUkpr+zjcjVuio8Q/tho46pzT9AYCfGjFqxb/vRM/Yrk04np2iAov1VcGPiVdV2a6henBBI852FV4RUSZ2FQZWfbNu+ZrGw== 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=j9yavLikGkWOUAHpJDoNuByy21OAP6xpRLR0X6u0FEc=; b=GdlA2ddrsSyj8fx5mQU9oVkmi5vIjZqkzL4/IttfGjLTXqTXUD49//d4fZu+dUsJ1UxqAZSxk4T8hDyJXQiyS65OjAoX8WsUZl0emm3VBn0ODuXSc37m/9930WaE5OIH1gyB22LGA04ynjbRGkgqZjeC1akT4rX43Yh651dp2m9hmI9HOVVz0rvBxCnHqcJPDMwgTbgnL88pvXruC8XCWeq4EQ/BJDqSxzO+q0JiDz++ElyX2o9cdGqb/sywCOxVnEJ61pi5rF279y9XLdlxxI2DqjSclTIL7oSojzKBO8me6k+cpXEBdT/dYd2ck9lGJL4M9Ay2LVq6QPIlxn3cXQ== 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=j9yavLikGkWOUAHpJDoNuByy21OAP6xpRLR0X6u0FEc=; b=Eqe/zXDunyLKtR8NZY/mPVDkfhHt/WbiDs01NrBPcBFIwbM+J1GoszzOYFJhkuuFhmFsuSDZPo38STO9225sKxtQYKg4weNtx8vU3k1gUI2zzENuhTzXkbKoWQNLOju+GDN1QvNuk9k4UZny6pEinV25sCCYBIvc7jNS93rBuHM= 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 SJ0PR12MB6880.namprd12.prod.outlook.com (2603:10b6:a03:485::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.19; Thu, 23 Feb 2023 14:07:33 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48%8]) with mapi id 15.20.6134.021; Thu, 23 Feb 2023 14:07:33 +0000 Message-ID: Date: Thu, 23 Feb 2023 14:07:25 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: longli@linuxonhyperv.com, Thomas Monjalon , Andrew Rybchenko , Jerin Jacob Kollanukkaran , David Marchand Cc: dev@dpdk.org, Ajay Sharma , Long Li , stable@dpdk.org, Luca Boccassi , Qi Z Zhang , Ajit Khaparde , Bruce Richardson , Konstantin Ananyev , Olivier Matz , Honnappa Nagarahalli References: <1677012145-3559-1-git-send-email-longli@linuxonhyperv.com> From: Ferruh Yigit Subject: Re: [PATCH] net/mana: use RTE_LOG_DP for logs on datapath In-Reply-To: <1677012145-3559-1-git-send-email-longli@linuxonhyperv.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0071.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2af::13) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SJ0PR12MB6880:EE_ X-MS-Office365-Filtering-Correlation-Id: b8ae1d69-6991-4933-7bad-08db15a74ec3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UiYpqsF1hZMAHmVCD2CbC4/F6kmdsXhB1zomuCZOateDziVp5aH+AO3d9W20Cd1sfolWUKL8m9YM7U48q/+ZuTFJrtrJwgoewwvM51/fmb6jGGxFsuqN0AUhRlh7VOH8Sf1sO8coa+zR3incBQn6CfzOlUI9IsVYoSxj9HwXXt2m9ccwGuA4BY6WOZQs0dKuCnL7cLAtKddFM/SzDHeJ2Y4GnurukVI4J5xv60SBi5IbFvp5l43v/oa4EXttCqgr4BzGZJfY6XENxIEN1rrQ3pIr1lFwLRqnxU17g7WF5/5ys5KTcYX232VJsRYZ4MjzoXi1JHkwbB8U52Ldg34FZlmzh3mRQKCmTN7SfzZpqipts3mq/BNqK2H6VBHOVJr1kHsvpKQX6tH0shhHqt0J4ekz/z8SmYX2SjgHOX5NuvCYbgSS1BoTG71N4NqPT+qQWG7PGTiwFTyvKdap0QleN8/59HHE7k6Tk50DcIDdNE1jtT++Gk/EN+RLAkxEmeU19x7YEnGytGHZCrZZFSnzOhAFUJQLi6H3H54BBzfcTckMmw8bVb20UxSePXh8FvE2mKXQ7hFkgxbYEDYfI7PBbX6DUDnNy2Jc+hIPnsBJJ7e7Lx9JgoLV01D8kCSIf7OR5u294S4Z8qwQF5d5Nui0bCFG4EXeEglQ2i/30+sdpXAayprN39gIHIGtTrd/4dxb7CCFdrgG4n7lhwHjFT1LEnzk5pR4nmBx0vCztZy5b/g= 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:(13230025)(4636009)(376002)(136003)(39860400002)(346002)(366004)(396003)(451199018)(31696002)(31686004)(38100700002)(86362001)(83380400001)(2616005)(8676002)(316002)(54906003)(8936002)(4326008)(110136005)(7416002)(66556008)(5660300002)(6486002)(44832011)(478600001)(36756003)(41300700001)(2906002)(66476007)(66946007)(6512007)(186003)(53546011)(26005)(6506007)(6666004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eGdTNVlsUHZFL2dPMlJicGdPcDVRYWIrRG50VVZBc2dzZWFrQkxGUWVIMzJ6?= =?utf-8?B?Tit6d3daaHo1SC9VbXhmVXhLSDdFYk9MeVJ3Tk44TFpIUmYxOUtMMUVoTWhK?= =?utf-8?B?ek14U3Z1NHF4ekhjbU9KSkdJeUdzMGVHZFAxaEJzUnh6Qm5Yb0kvWE9ZcERV?= =?utf-8?B?SWJza09zUE5FTVBDeFpJbnRDZmQ5Z3pVUWFTRGNUdGhFdkJWL1J4VllrT0J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R0UTgwNGxHNVhGUjdEc1BtUmJYdjlQREhGTzg0?= =?utf-8?B?a3R0TGdaRVNRNmNMUHhzTU5pamVGNTRLVWw2T1l4SjNvWFk3SFNFT0dQY0Ji?= =?utf-8?Q?dgfGdNtabelgyLVJnBq7BKmCq?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8ae1d69-6991-4933-7bad-08db15a74ec3 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2023 14:07:33.0690 (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: 0UF6+ncGD4AGKoxmlICaCkz+frilgJAzUKt6yTHlilRgQmnDdxTM1xYo+XWwvRXs X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6880 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 2/21/2023 8:42 PM, longli@linuxonhyperv.com wrote: > diff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c > index 300bf27cc1..a45b5e289c 100644 > --- a/drivers/net/mana/tx.c > +++ b/drivers/net/mana/tx.c > @@ -183,17 +183,17 @@ mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) > (struct mana_tx_comp_oob *)&comp.completion_data[0]; > > if (oob->cqe_hdr.cqe_type != CQE_TX_OKAY) { > - DRV_LOG(ERR, > - "mana_tx_comp_oob cqe_type %u vendor_err %u", > - oob->cqe_hdr.cqe_type, oob->cqe_hdr.vendor_err); > + DP_LOG(ERR, > + "mana_tx_comp_oob cqe_type %u vendor_err %u", > + oob->cqe_hdr.cqe_type, oob->cqe_hdr.vendor_err); > txq->stats.errors++; > } else { > - DRV_LOG(DEBUG, "mana_tx_comp_oob CQE_TX_OKAY"); > + DP_LOG(DEBUG, "mana_tx_comp_oob CQE_TX_OKAY"); > txq->stats.packets++; > } > > if (!desc->pkt) { > - DRV_LOG(ERR, "mana_txq_desc has a NULL pkt"); > + DP_LOG(ERR, "mana_txq_desc has a NULL pkt"); > } else { > txq->stats.bytes += desc->pkt->data_len; > rte_pktmbuf_free(desc->pkt); I have some doubts about data path logging, let me use above example to discuss this, these are not specific to this driver. TLDR; jump [1]. Above 'ERR' log will leak into the production code, since 'RTE_LOG_DP_LEVEL' value is 'RTE_LOG_INFO' by default. Question is who will benefit from these error logs, like descriptor having null packet etc.. I can think of following users for the dpdk logs: a) DPDK library/driver developer b) DPDK application developer c) Who deploys/maintains DPDK application d) DPDK end user Unless DPDK packagers or who deploys DPDK application updates 'RTE_LOG_DP_LEVEL', all above parties will observe these datapath logs but I assume intended user of it is only (a). Overall I am not sure if anyone is interested in driver datapath logs other than driver developers themselves. For datapath logging I think there are two concerns, 1) It should not eat *any* cycles unless explicitly enabled 2) Capability of enable/disable them because of massive amount of log it can generate Currently there are two existing approaches for driver datapath logging: i) Controlled by 'RTE_ETHDEV_DEBUG_RX/TX' compile time flag, when enabled 'rte_log()' is used with Rx/Tx specific log type. ii) 'RTE_LOG_DP' ', compile time control per logtype via 'RTE_LOG_DP_LEVEL', when enabled 'rte_log()' is used with PMD logtype. In (ii), need to re-compile code when you need to increase the log verbosity, and it leaks to production code as mentioned above. For (i), developer compiles once enabling debug, later can fine grain log level dynamically. This is more DPDK developer focused approach. [1] According above, what do you think to retire 'RTE_LOG_DP', (at least within ethdev datapath), and chose (i) as preferred datapath logging?