From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id D8702A0032;
	Fri, 21 Oct 2022 11:50:31 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id CBDE442BF3;
	Fri, 21 Oct 2022 11:50:31 +0200 (CEST)
Received: from NAM11-CO1-obe.outbound.protection.outlook.com
 (mail-co1nam11on2071.outbound.protection.outlook.com [40.107.220.71])
 by mails.dpdk.org (Postfix) with ESMTP id A935442BA6
 for <dev@dpdk.org>; Fri, 21 Oct 2022 11:50:29 +0200 (CEST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=U85q9vEO7QL9wszjAJWHGNECGbbvBLRbjDiQfMHfLORW4XwEa8Ex+QpLh7JRhPYd9IG+WIif0kbtv+PgXqMwgiMGhSjekYCBtz3x+nB7SCS65YbSe+eNvM8OoYD6d9+/mtEI4s8O60vcfgv2F7MsxCoIdNRjMWyrpPV9aszS7Uko5paOcc9osCFtDiTU3tV2b7c3mwaW4tziPTj9xJV6z8m8YUJsn98oJO8C7/J66ImfkWyA4K5NXDVXGcOBeM7AY1TeQZ2G2nhJi5zaSfTS2nNUMOSR0VS5Cka7gPCeJBj83xzGuPkxDOv5nFpFRSdjJ7jJPbmEhaR4ViERKNwHQg==
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=oG3wpS+E2EU5r4XKp5TgCTj1/n2VDZyib5CDqqqaXwE=;
 b=jrhMyLPUQ+0iPAmJdnJghEuUlPKEq6kU+vxmGJBBNSJzhRYsNTn5ooOGMajrGV2rAMwr88qg/YC8xwNODo2GzrZNt/93LFmhRa+j+R0qkY9bpfVCnENY2zIug9G2R5FwX0HNisrDUSroM9nx9jlwc82i3scGlgruOm54Tdduc9Mc5yJhB38+u7rfdzkvafQNgONhUD4XLxjwrjClYqP1KTzIJmvEhkWMtqjX62fKaQcQXW2TeXmbSv9wyw15Gcw+iV+iCgfjM/n7YWcEplrtZBQdXahX7k4O6SMI8DkRVtcfDMCS3vM5DB5x4VYgXXvU3xcqFQCi49TszlhOFiJsmQ==
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=oG3wpS+E2EU5r4XKp5TgCTj1/n2VDZyib5CDqqqaXwE=;
 b=wLnOZuqNWHmhVOakyxM6+EU8z3i3+aivGSONnsMA2QmRi4OYubVNVd5Bcq9YBWEPvnH8N+DkB9AlEGa3A3MmugHUO4O3EtJ3072ErigupXwWyLRmBtARX5CK7yx0wGNBl+BL8UgpqooEe2eMzh9Q6SXnDxyArXxX0gN94DUcTMc=
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 DS0PR12MB6582.namprd12.prod.outlook.com (2603:10b6:8:d2::14) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Fri, 21 Oct
 2022 09:50:27 +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; Fri, 21 Oct 2022
 09:50:27 +0000
Message-ID: <5b2e5aba-1fbf-5adb-b527-24e33437bbd6@amd.com>
Date: Fri, 21 Oct 2022 10:50:22 +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: Junfeng Guo <junfeng.guo@intel.com>, qi.z.zhang@intel.com,
 jingjing.wu@intel.com, beilei.xing@intel.com
Cc: dev@dpdk.org, xiaoyun.li@intel.com, awogbemila@google.com,
 bruce.richardson@intel.com, hemant.agrawal@nxp.com,
 stephen@networkplumber.org, chenbo.xia@intel.com, helin.zhang@intel.com
References: <20221020103656.1068036-1-junfeng.guo@intel.com>
 <20221021091928.2674471-1-junfeng.guo@intel.com>
 <20221021091928.2674471-6-junfeng.guo@intel.com>
From: Ferruh Yigit <ferruh.yigit@amd.com>
In-Reply-To: <20221021091928.2674471-6-junfeng.guo@intel.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: LO2P265CA0462.GBRP265.PROD.OUTLOOK.COM
 (2603:10a6:600:a2::18) To DM6PR12MB4297.namprd12.prod.outlook.com
 (2603:10b6:5:211::20)
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DM6PR12MB4297:EE_|DS0PR12MB6582:EE_
X-MS-Office365-Filtering-Correlation-Id: 069a79ca-1542-4f1a-1b46-08dab349aeee
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: +SKH2KaDRFdgf6Ho/GyneWvZ26j61uob01EuYt2kfdor+kDtm7rC3S2bBFGBVxpRHmo4NXujTLHMqYYel2xseVc+4+4ZJfcsFtmo5KTjo+P+5RXEQTi+Qqh/MqlH/1jTwWVKP1VvD0/HgOkX1a26DeX3p01TR6ZhvbPWU0lrqDZSv/rDPwZaQjdvT6k3SiHyOCK/LuKK2flrYKCdPrD2rV9wqTkYE6db9nTSBBr6oJrdMDbqW+d/X9qrNPcp6DqOqYYI1D93G6Piu54gwDEiVjhxTjaLJj8TG2i6QcbUrMtlkeMwBtZIrRx9uvgeCBQhVzC1YoLRPyCh/AyS8PsclaX2l4IZZYQt3/dfoYzuqp1tRFtURg3XadW0JbqGafmK/A7hhS5ZhxUqu2uDLRS3LSsvDxbm1WmcG15h32LGpgkwVe7QTqS6qCd2sw4AGbPxH/dS0JXXSrbjqkgn6PcWpYi11FbrGkC7bAhl26p81fOPCXdQEJ9HUvWs1VDs8A5Bm60XfVsSFZdksPrPm1sipEwrvV4J+K6a9ITuhM6B+TPJU6mGE0yp98Tr1SKi1ejdUWzrhoh0ZrHX8/tngAwIM8fn+IDoVFw4K7Yk0JPALGMFv4IaRK4bSI/c3kggQHVpiCuOb4v4E0O9ab4PQyGJ341AFHXU7DRY51sY0cFlIUySBs1sBZN4LhRu7q9KnSsgDYoss+Q01TMTMVM98PRKFXc4jIncz3j3JliUkrBUt40Cad2LEP6dhXXPmSrCfH2O+armDT53D4z16B4F8n0RktoXK9CZDqqTbdZREZTH8+0=
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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199015)(86362001)(36756003)(31696002)(38100700002)(31686004)(186003)(66946007)(83380400001)(7416002)(5660300002)(2616005)(44832011)(53546011)(26005)(6506007)(478600001)(6512007)(6666004)(2906002)(41300700001)(66476007)(316002)(6486002)(8676002)(4326008)(66556008)(8936002)(45980500001)(43740500002);
 DIR:OUT; SFP:1101; 
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?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=
 =?utf-8?B?YXFSeTRwM3JCZ3hDazgvODNZcU0vWDVmMnJybVJyb0NUaUdhRzNFOFhoa1VN?=
 =?utf-8?B?c3NRNmF2Z3NaMk1yemR3YWFEMEtwQ3M1c1BVUlVidkRDd1RIYXU5NktudlN0?=
 =?utf-8?B?cGF6T0R2OHZUaTdIUXdUMk0zZkhwWXVqNkEyaWM0UWNxYlRkYWRRdkUxMEdN?=
 =?utf-8?B?QVhyUXZ2M1hXVVhEUWp5b0JIcDEyQ1JzQzBCOFRkSEo1VTlFSVU2dnVNNnhM?=
 =?utf-8?B?eXZEVVVvSkdPT0lLcEkwdGVRVEZkb0NVSnRGWmpPSWt2OXBCYmt0N0M1YzJN?=
 =?utf-8?B?YVpEYlVlQ2RWb1hzQ2VjU2RGbTFFV3FrWWViYjdqYWtkMUZWaDZ2WUFBNzhr?=
 =?utf-8?Q?GKEq6NUe1UmF7CXPL04Dkl8DF?=
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 069a79ca-1542-4f1a-1b46-08dab349aeee
X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4297.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2022 09:50:27.7045 (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: DhwY3wg1WXCVo/EE7gLJX1GNx8XOpW/t3EYzwvfRBwTK5yD+ClYd+eoyuFM9mx7n
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6582
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On 10/21/2022 10:19 AM, Junfeng Guo wrote:

> 
> Support dev_ops mtu_set.
> 
> Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
> Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>

<...>

> +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()'?