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 B7692A034C; Mon, 24 Oct 2022 12:48:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB84C42B72; Mon, 24 Oct 2022 12:48:01 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2047.outbound.protection.outlook.com [40.107.95.47]) by mails.dpdk.org (Postfix) with ESMTP id EB7784282B for ; Mon, 24 Oct 2022 12:47:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V09dwcg7uqeFtVPgIqQPeH1rmbqytFq+dXagZgm2t/V3k3PganrHFeGWo18ICw5i0plEMFVQq5Yy+h+5Bv9rlREQl5lff6LYlda5f4gU/UJwVUvK91TmtYIWyb2SjN6WGkzygVw+b8HJVErgORWnqZRhqgoADDol8KuFecHNTKrqH70uMFQpeO2o7WxxGuT5qaCprGh6qMwm8ZWfL9waskWnL5ODLoDY0k74yPH0sLLUWDEn9kqmZnC0rVf3j/3DEfvDtokXScJ3Ew48aXKVn2lFPL5+wL/NBCF2lGwfZwLN6flZapK3+fLV8N68+Pa0cWjs2a4jvOLAux0o0CZHSw== 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=/4pswYpAiB/7Ec1rs0Dnk5YV82015m1LLPpRFELCrOs=; b=T98FUHJYRQ5QMRuJV6KlY2sQmxERH5hWdxKzWRo7jIwLaz/CY5l/vwCED6VyFB3ySDBTJ9PfzVofyf6Z9JbMJLhqfek2E7YVuaLX5kPdKlcCbxjpFFWZuEkwVDpMdyVLwh2KPpdhT0v4K2U4SDpa0qUPN0KoGcCveH6TgvqzAsMnCr+zBYkrQAVA6DDMEXeduM77huVHQqLlDP3XXZ56T5DrRo9h0ztroAb/17bVtYKp9U007C3MdM2na/XJf+Hm7OCIknGKHgRXsjvfKJf3Cu+VwEluweAzGkjdsoLYRJGvkfYwOQ80M1dnK5JnGr94PDdcQIdOJsIUNkmtRVw2AQ== 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=/4pswYpAiB/7Ec1rs0Dnk5YV82015m1LLPpRFELCrOs=; b=yNoioiHacUylAH47rxt/al4AyNlQx567PcMpGrjquwDsieg/s+hwyBa4Y9QzfUMfgFj5AZPtwU6Kr30jgMnZlhC3SZIN2HNCXPRShKDytdojzvkURYji2fBUq1qOOg4wYYWE3YcMqpbcmzdKhM+dW/9/wWS3XJhatg6jiaMiRCY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) by SN7PR12MB6959.namprd12.prod.outlook.com (2603:10b6:806:261::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.33; Mon, 24 Oct 2022 10:47:58 +0000 Received: from DM6PR12MB4297.namprd12.prod.outlook.com ([fe80::b9fd:e732:4585:6b25]) by DM6PR12MB4297.namprd12.prod.outlook.com ([fe80::b9fd:e732:4585:6b25%7]) with mapi id 15.20.5723.033; Mon, 24 Oct 2022 10:47:58 +0000 Message-ID: <46b03108-5824-4f67-a89e-b6cba460b272@amd.com> Date: Mon, 24 Oct 2022 11:47:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH v7 5/8] net/gve: add support for MTU setting Content-Language: en-US To: "Guo, Junfeng" , "Zhang, Qi Z" , "Wu, Jingjing" , "Xing, Beilei" Cc: "dev@dpdk.org" , "Li, Xiaoyun" , "awogbemila@google.com" , "Richardson, Bruce" , "hemant.agrawal@nxp.com" , "stephen@networkplumber.org" , "Xia, Chenbo" , "Zhang, Helin" References: <20221020103656.1068036-1-junfeng.guo@intel.com> <20221021091928.2674471-1-junfeng.guo@intel.com> <20221021091928.2674471-6-junfeng.guo@intel.com> <5b2e5aba-1fbf-5adb-b527-24e33437bbd6@amd.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0046.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::15) To DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB4297:EE_|SN7PR12MB6959:EE_ X-MS-Office365-Filtering-Correlation-Id: a3193f94-1f62-47d6-b205-08dab5ad36d5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vmdN8vQyX1+SPfX9B0WwODSaML6UMA4zEUjlz7Kwjkanvk57rvQwJummbKQLDn3AZGNYMQIr4rAi38BrKI5sCdLkOYawn006u5LBPHdE6MWZOuV1D6+i4Oy50O3myfpohjl4ON1u13YqHrCUSYNpccHxka5JLrjWD7jhBtikYaLGS/MQKrZgRIuNWpC2G76ZGUZuzMJ34LlWanlPnUVPJ7fN9hxp9AFmyWBomky0Rl+0qtyFUxbd2ZfNlRZYSOhuGvGmgJfdUNKCgLTi0n/fpOjejVmzefL9xSOH/xdb+NX8eqLAuYOc0DFYX8z3ORoOeRHpsY/UpG04c1sQm9qkNsB/8d3D3RRInTwhpEF3hqgPKVAo+MeEqYVlEzxz976P/V1P/UBVHFAqyY48m/jHY7XSNzyW8ZIauvIN0wmPimtz5WujYPJD4RX5HP1cQ2Dr3Ig6I9okcHlm2QKQUoMYLGUsYD5uPduCe5h3oSncONBjQx3+eEHgboOkUl2kPnJVGhkeDgbffp6O+t8oaY/x0FtUaVh7GtO5Z4oiDGk0HtNJ71EnHSXSiXBPBuaWKZ5DQ8xZiZqnYinw0ix+8V+vYsdi1BDDojWwaMgkqF5uvF1z/OjSaIq3y5jC3BkwfFeahzebHMBM+Hq8rR0A3Qmd0OtVcW1LGj5q5kiD4WxTMt+68sYuzOG8QQw2xBayOxJckOzrp9XieFjUiXMpS5bZcHMPVDAQAMdGzMTICZNNcmzUdGWPXYWdv7Cfoc3TWHwUPMSVmct2FhWZtADkIm+28qGTrgm8j+ihpXCxk1NVdEA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB4297.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(366004)(136003)(346002)(376002)(396003)(451199015)(83380400001)(31686004)(6486002)(54906003)(316002)(478600001)(110136005)(66556008)(8676002)(44832011)(66476007)(7416002)(6666004)(66946007)(38100700002)(4326008)(31696002)(36756003)(8936002)(6512007)(86362001)(26005)(2906002)(53546011)(6506007)(5660300002)(41300700001)(186003)(2616005)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SURhc0FMNUlHU0FNZklMcUFKeHRhamVJcmkxWStUVVk2N0lBZDJvQzI1M0Fn?= =?utf-8?B?TG9SYUMyMDEvZU00WFB2S1dEdWJKVGhaN1pZdmg3M1NsblZnSUkxaTRkZWtN?= =?utf-8?B?NX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0RjRNRnU0ZUdoMTR6bXVKeDMyUzlYRld4?= =?utf-8?B?eWs2RHF1N3NsU1hsZmw5QVVLWmFVWXd2VXp6c2tUUEFOdkQ3SU8xbjJiN2xy?= =?utf-8?B?VDIyNFpIMUt5WkZrUDFyTmZNV2o4akQ3a2NkdEJJM2owKzJySzBwYmUxamRH?= =?utf-8?B?UXNuM2lTVmJSNGJnbDR1UDFRMm5aWS9yQnNzWlU0Q0dNU3VUbTEyQmliWkJx?= =?utf-8?Q?MD0frvJ2ng6h0ZNLaxyNH50DR?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3193f94-1f62-47d6-b205-08dab5ad36d5 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4297.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 10:47:58.1853 (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: zc2wGvWHqyMLp4NmzLbWvFoLtvsr2RLVkoQBiqaSdUksgcs82sLU1XV0JAG5lBhb X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6959 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 10/24/2022 6:04 AM, Guo, Junfeng wrote: > > >> -----Original Message----- >> From: Ferruh Yigit >> Sent: Friday, October 21, 2022 17:50 >> To: Guo, Junfeng ; Zhang, Qi Z >> ; Wu, Jingjing ; Xing, >> Beilei >> Cc: dev@dpdk.org; Li, Xiaoyun ; >> awogbemila@google.com; Richardson, Bruce >> ; hemant.agrawal@nxp.com; >> stephen@networkplumber.org; Xia, Chenbo ; >> Zhang, Helin >> Subject: Re: [PATCH v7 5/8] net/gve: add support for MTU setting >> >> On 10/21/2022 10:19 AM, Junfeng Guo wrote: >> >>> >>> Support dev_ops mtu_set. >>> >>> Signed-off-by: Xiaoyun Li >>> Signed-off-by: Junfeng Guo >> >> <...> >> >>> +static int >>> +gve_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) >>> +{ >>> + struct gve_priv *priv = dev->data->dev_private; >>> + int err; >>> + >>> + if (mtu < RTE_ETHER_MIN_MTU || mtu > priv->max_mtu) { >>> + PMD_DRV_LOG(ERR, "MIN MTU is %u, MAX MTU is %u", >>> + RTE_ETHER_MIN_MTU, priv->max_mtu); >>> + return -EINVAL; >>> + } >>> + >>> + /* mtu setting is forbidden if port is start */ >>> + if (dev->data->dev_started) { >>> + PMD_DRV_LOG(ERR, "Port must be stopped before >> configuration"); >>> + return -EBUSY; >>> + } >>> + >>> + err = gve_adminq_set_mtu(priv, mtu); >>> + if (err) { >>> + PMD_DRV_LOG(ERR, "Failed to set mtu as %u err = %d", mtu, >> err); >>> + return err; >>> + } >>> + >>> + return 0; >>> +} >>> + >> >> [copy/paste from previous version] >> >> configure() (gve_dev_configure()) also get 'mtu' as user config >> ('eth_conf->rxmode.mtu') which is ignored right now, >> >> since there is 'gve_adminq_set_mtu()' command already what do you >> think >> to use it within 'gve_dev_configure()'? > > There may be issues to set mtu with ('eth_conf->rxmode.mtu'). > So better to keep this ignored at this stage. > What do you mean by issues? 'eth_conf->rxmode.mtu' is user provided config parameter, so user may prefer to provide this value and not call 'rte_eth_dev_set_mtu()' at all and still can expect correct MTU value.