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 910CC424F4; Tue, 5 Sep 2023 17:46:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 34CB2410F9; Tue, 5 Sep 2023 17:46:59 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2075.outbound.protection.outlook.com [40.107.244.75]) by mails.dpdk.org (Postfix) with ESMTP id E68A2410F9 for ; Tue, 5 Sep 2023 17:46:57 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=khHO0Eg6U9uYzYd/Dgeg0OOS312OO084etTcgiWY6sdF7Uqg1kxJrhepIYenBtgJU4jkn9HM/GcJ5rqYgYB0USFCyP6bX9WuKwYn7dsrJrfjZ1G6uz/9ydGqrShNMLfx1zRfWgNofLtZLcT1od9gFU+p4aKz4V2lY+jk/Mxzph7RC7PQ2+zKLxgLWwrGLyJ4NEblg+Rqlu1xOMp4JZaiH0XIGafCw7nGYmJ+lyVN9vC9kNPAJKlexIpqMvt7QQZWMrpPoHaHg9fOnmMrYDt7whMYzrVk+tomW0A13j86KhXQi6gEqjchhNt99sFJcSy5R2BjK8bp04qzsM2tQA+elA== 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=J12MfEbxeQ+cacqBNsk+4C/lGp5eK+4YK8lLl0ad1uQ=; b=CBAKhRpbRlTvA8ztItrTj23MOUEK9vMkt5ranAG/TWc0CdrRK1HJkupGnqwCfnhDkBh3pMEsajWG2GG7I9ZL1H+yOkiDaF5I26J+XkK54E9XUQbNYtVPux6Gw7HtYph6X96lMWSazpPA9mYYO8tgSiTQdEhJ9DKe6a3NWQOs3FTmofZ2I7+h/bOjhWRoNR3vbyKdJAGVkFqnJQs94IdO2QH1ByHq9xcJIZS5ul/LvBlsYy1/P8DXShPIU/HqPeWFMDKDmrwxRINRDW7W5E3v2i8ze3Ez+QssRNTtXQx2k5OTloCeqVjbHVzoaqi9BqSqPAQH/ulfj8LnGE+9bD3x2g== 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=J12MfEbxeQ+cacqBNsk+4C/lGp5eK+4YK8lLl0ad1uQ=; b=hSAiPGFebkCc4ZIHAVT7HSbUmqy/0FJlaofW6AHV8mKlDcGx7N6RC4BDyDcjSi1J+L89BGLC6c6gmB+hrOX1Ph/Y8bDu5atSy+PK8bWgcj8X0FUwHsAeZNwlwjkhnBccuAY7/qQ3gXPnthHKpbaL5Q2c7q7gH8W8e19MBfur4Dc= 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 DM4PR12MB5166.namprd12.prod.outlook.com (2603:10b6:5:395::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.33; Tue, 5 Sep 2023 15:46:56 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::49e9:2bf6:7f06:bbbd]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::49e9:2bf6:7f06:bbbd%3]) with mapi id 15.20.6745.030; Tue, 5 Sep 2023 15:46:56 +0000 Message-ID: <2fd454a8-fa2e-0acd-7f37-37bf87be7f5b@amd.com> Date: Tue, 5 Sep 2023 16:46:50 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Content-Language: en-US To: Wenbo Cao Cc: dev@dpdk.org, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, yaojun@mucse.com References: <20230901023050.40893-1-caowenbo@mucse.com> <20230901023050.40893-8-caowenbo@mucse.com> From: Ferruh Yigit Subject: Re: [PATCH v6 7/8] net/rnp add devargs runtime parsing functions In-Reply-To: <20230901023050.40893-8-caowenbo@mucse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0235.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:315::12) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB5166:EE_ X-MS-Office365-Filtering-Correlation-Id: fe14b9ce-baad-4cc1-8d0e-08dbae275516 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eRKDiF3UE4KaH0h6qX4hciWujj61iA+AD102Kh3eE/n8PyIb6MSALVfzoOd9k9HdhObca/4tbX0GdfkaVli60svmJvOMXN6i3b6e51ZIBHmaRnQFwL+NJt0VukC5TCPBWUI8Soqz3RRUvE+S1icbEAWnRQR0dxS5FsrlNV/EyCsQh/FboLtYDLQ2ySP7tQ65fwlbIN/d5nVOu/06c00k0NDQMh/79WSQ/flBDcVdZN/RAdRHP6p1KGWR3qCce4lvXF9jTBK1f6qqEGijifmgdx7k+Ds88THKm6BifwUEk2/8qAqqYYiiCPzV22biW36H1a6+HAMkWUuQ/+xFcdRpT1SGNiph5PvhpIhssX6sPQmasCt/kJxpxcS0UQEt0bDslXDOH0+hlPBRffLK9bDw/xzH+K07srSipMblXeDCaydqzu5qo9XS+uHmzyF3jqRm72jrI8qwwRHtBBC8xdN98XFsZGqGSC18z3Df96yrtlKA61REjlbUsRAiGfpKCaUs3r46wweN/gdx1LLEhsdG45X2N+0Q5v6Xu3WOMJO9JTKSKj9IW5tzHJCJYZ+giKaIkJ3e7wVthiRjgtxk1C8Zljy5q3/pEIAewNOwP9VgfpvZpSC9+TY0v8jxDrdvI3ETzOYrYsn/vROg16bNP2m9eg== 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:(13230031)(39860400002)(136003)(396003)(346002)(376002)(366004)(451199024)(1800799009)(186009)(36756003)(6666004)(53546011)(6486002)(6506007)(26005)(2616005)(6512007)(6916009)(316002)(66556008)(41300700001)(66946007)(38100700002)(478600001)(66476007)(31686004)(83380400001)(2906002)(31696002)(86362001)(5660300002)(8676002)(4326008)(8936002)(44832011)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dWJobTFPcURPZTBwY0FPUlZiNDJHYVk0OWVBa01wVjZlM0xOMDlCVStkblox?= =?utf-8?B?T0NQTDhpdEx1UENVVlFoa24rWm9lcmtSMlpkRGFnNloya1hIcnMwYmdWQjYz?= =?utf-8?B?R0JPN2tQRk5NRTJHbUZVNjA2Wi84NjEzMWdnQ1BXTlJZM1pKcEp0b2ltWUlF?= =?utf-8?B?cHliazVKWENSMmtWdWdRYmpHZmpHNXNXNE5qWWRrRVNCUHhyRGZpc283Rncz?= =?utf-8?B?b3M4eTEreGhIMkRWQVlUL1ZaZlJEZ1g3VmkrV05oWnc4NEtkUk5HeGFCbEND?= =?utf-8?B?OGY5cHE1ampZOUlVNHpTR3ppak9mbHdPSHpjS0NNbnducEZxKzE4RThIY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RBFZpPDgt?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe14b9ce-baad-4cc1-8d0e-08dbae275516 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2023 15:46:55.9654 (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: gnomCgtV2W2DoM1AudVB4Uf8dbmW+Qdj9dgEYto1TUXX2AgKn5Dv1BDqwKXiUvnd X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5166 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 9/1/2023 3:30 AM, Wenbo Cao wrote: > add various runtime devargs command line options > supported by this driver. > > Signed-off-by: Wenbo Cao <...> > > +#define RNP_HW_MAC_LOOPBACK_ARG "hw_loopback" > +#define RNP_FW_UPDATE "fw_update" > +#define RNP_RX_FUNC_SELECT "rx_func_sec" > +#define RNP_TX_FUNC_SELECT "tx_func_sec" > +#define RNP_FW_4X10G_10G_1G_DET "fw_4x10g_10g_1g_auto_det" > +#define RNP_FW_FORCE_SPEED_1G "fw_force_1g_speed" > + Please document these runtime arguments in the device document. Also please add 'RTE_PMD_REGISTER_PARAM_STRING()' macros to document argument for pmdinfogen, please see samples in existing code. <...> > + > +static int > +rnp_parse_io_select_func(const char *key, const char *value, void *extra_args) > +{ > + uint8_t select = RNP_IO_FUNC_USE_NONE; > + > + RTE_SET_USED(key); > + > + if (strcmp(value, "vec") == 0) > + select = RNP_IO_FUNC_USE_VEC; > + else if (strcmp(value, "simple") == 0) > + select = RNP_IO_FUNC_USE_SIMPLE; > + else if (strcmp(value, "common") == 0) > + select = RNP_IO_FUNC_USE_COMMON; > + There is already an generic eal argument that lets you select between vector and scalar datapath implementation: --force-max-simd-bitwidth= <...> > +static int rnp_post_handle(struct rnp_eth_adapter *adapter) > +{ > + bool on = false; > + > + if (!adapter->eth_dev) > + return -ENOMEM; > + if (adapter->do_fw_update && adapter->fw_path) { > + rnp_fw_update(adapter); > + adapter->do_fw_update = 0; This patch also enables FW upgrade, can you please detail this in the commit log? Or even you can consider to split this part into separate patch.