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 F1B36A0542; Wed, 26 Oct 2022 04:15:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8D8140E28; Wed, 26 Oct 2022 04:15:45 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id DCDB040A7F for ; Wed, 26 Oct 2022 04:15:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666750544; x=1698286544; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=k36anDaiHgtmDimNCJEOIt10DCtmd8jYlub3nR8mo4Y=; b=LC+Ro07PbXzsBNAXEfFEdAT/zc5tqLqjhc/Rdd2UzGEnnjg3yfKgTjhy A/KXA3iqkMNz4ClqYNM6ZFr75pOtlR3a+yHfwffkULBYJ9FkuKetK/HKg yztZoWcTGMjou4ies6dxaMmn0yzLSyj0AS0HP/NG54L1AVVJ9A0ZYeW1E vEswCcc7ZJaPlRSwaTQdYm24PnZV10BeJbFbZSh3GoQN/Y5KBMYjZ7YIU C9E15zXf/7qEui0tdYjKlCEdx7Hdt2bOAIWXIdJaD1TzoaQXE7rU0so0A bBVQbDo5WxluW5oQxtcFTPlNpXA0MObDKxQHstLD00MIvW0isD7jZ+/fy Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10511"; a="295244824" X-IronPort-AV: E=Sophos;i="5.95,213,1661842800"; d="scan'208";a="295244824" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2022 19:15:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10511"; a="757145188" X-IronPort-AV: E=Sophos;i="5.95,213,1661842800"; d="scan'208";a="757145188" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga004.jf.intel.com with ESMTP; 25 Oct 2022 19:15:37 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 25 Oct 2022 19:15:37 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 25 Oct 2022 19:15:37 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Tue, 25 Oct 2022 19:15:37 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Tue, 25 Oct 2022 19:15:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kUOEb8k0iJ7p6+PTNCJKe8W74Cz6oLTBgwnx8amtx5A9Dj3WtbSOuD8sGauneZpoJj30ZR+3Yk0pVjl4zrNG5Wj1Ig+y9gPBZmoHjI+nzSmyj/zUs/+z1EiBwxc5OHoenSTB398errcbpdDT1qLWB4UtNhEVedIuTGBdZzDh0vcMBAbHD/2zvmSGim6cg3iWPTDUhCukrTCXBZ6veqDVeC0PorFZ3RetXMq3DAVLXNVsnBjbfGh5gFpQwlA5zcNJjESICqIWlTLn9FOz7t1qjfxgBF/VqC8CxTyKCCwzFEihgp3PACXUFGHT1g96ynuIVoiRKWV8c/rt18kDFgIjNw== 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=YoMSOCEoPChtaupCBo1ca6sMjoDFG4ACG2jwHp/ez5E=; b=U83+MFtJfFuSz2aD6RvTdhJi5gwlMalWPYB4gHlDuEqjNwBqbrSASfvvmdS3xOl3ftjiGA/wONLLbVxaOTlgPm7HZSisg64InDTE1lfFipXFs2RVC4dySxqsOK/T6mg91UqE0f3rmWCV3I5IGIHWZKxFEZnlohlY1uM3u8Ic1OIv++e/CSKxkN1Cu3H6ENi0dRMwmcD0xhEwmhsbPYLK97s+6zilyrbvBkFElu0xgpUJWFE0HU4rK6/mcwg6c8lPdCl2Mn+PkOLXJBkEyLabJino7EOtLGKZQUxWHHNnP3Gb9tt5BZhDI97f8lWfb4navYaHWFjqz59ISjk8XQ27ug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB3723.namprd11.prod.outlook.com (2603:10b6:5:13f::25) by PH0PR11MB4983.namprd11.prod.outlook.com (2603:10b6:510:40::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Wed, 26 Oct 2022 02:15:35 +0000 Received: from DM6PR11MB3723.namprd11.prod.outlook.com ([fe80::126d:f905:c1d6:dcb9]) by DM6PR11MB3723.namprd11.prod.outlook.com ([fe80::126d:f905:c1d6:dcb9%5]) with mapi id 15.20.5723.033; Wed, 26 Oct 2022 02:15:35 +0000 From: "Guo, Junfeng" To: Stephen Hemminger CC: "Zhang, Qi Z" , "Wu, Jingjing" , "ferruh.yigit@xilinx.com" , "Xing, Beilei" , "dev@dpdk.org" , "Li, Xiaoyun" , "awogbemila@google.com" , "Richardson, Bruce" , "hemant.agrawal@nxp.com" , "Xia, Chenbo" , "Zhang, Helin" Subject: RE: [PATCH v8 5/8] net/gve: add support for MTU setting Thread-Topic: [PATCH v8 5/8] net/gve: add support for MTU setting Thread-Index: AQHY6FGDEWnU2AvkYUyO3oRBUYv9nq4fQ8OAgACqlEA= Date: Wed, 26 Oct 2022 02:15:35 +0000 Message-ID: References: <20221021091928.2674471-2-junfeng.guo@intel.com> <20221025090729.2593603-1-junfeng.guo@intel.com> <20221025090729.2593603-6-junfeng.guo@intel.com> <20221025085527.48ed5551@hermes.local> In-Reply-To: <20221025085527.48ed5551@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR11MB3723:EE_|PH0PR11MB4983:EE_ x-ms-office365-filtering-correlation-id: b24cc084-73ae-4967-8f3c-08dab6f7f76b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Rr//Ug/kiqcGS/YbVqIlg8wfWD1AyIIDPeHRP+kUe/ExnN3mGO7BHZ9jawl+oNSnCEYBcr1HV7BrVOZ+Iods6V0lmlT9g19jdFjaFXe+B/mw072RI2kyJbS/OKcoGBHG4MiMde7V9fY1VqumM21tEQkGljrAUlkif82D/rBFxyHDTTJEScyhfwHRqdaCN2leo+JqdbXQS/78qOQVhewM/y98CeLU4iZXAOkJpe2Zl9B9um+rjYiDpMXHXJaxLigUm1NAL6YW7LkqkbOHBpu0g4jVQ3EYlE/UjbJDXqO6hzZpELWtkhtIMi4+ZePWtHZfcKPrQWWJqdjUxU1iz1tLfDbNYAX2lYM51Acm+n6w6tpUCjkkT8fWjHsYrXNxdNHiNhZDvt/8dm+7tYFRYIE+Ug7SdAyHGBWOQUP7e2kWfcP8ZRyhK8ULG/wI48IFBCHdNxXb5eQEp+D3phn9S/0hHVIMls692bWIxKX3To8jK0aW9FPKwCuyIBLIzc+IE6azK2UKACXfFqCrN+SrxqP9NLvxFUxrA0jiA3JoGYXQYMiVG0UXmAotfG/mV27jy0+jUWEU/sXfMRqZoSOLKNdqoPxOVKLNfryV8z8o8CqjB5W+3bg4jhR4KYPw0hSdtOCYbHlo4b5iynLsrkju9jfMmUqBb3tCR0hHjd3fBL190XE61Rjh1MRdMH/Xeq/lGZxCCSX38s3tcfhR1j7SKfeL/QR1EBZy6tdZSENfMMcvjiNGVCotrC143Lr9jLjWczPvLvQ5NhpRBkvIH0H64qFhJQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3723.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(136003)(346002)(366004)(39860400002)(376002)(451199015)(38100700002)(82960400001)(52536014)(66446008)(66476007)(66556008)(66946007)(76116006)(5660300002)(64756008)(8936002)(122000001)(38070700005)(83380400001)(86362001)(33656002)(6916009)(54906003)(316002)(186003)(9686003)(71200400001)(478600001)(55016003)(26005)(53546011)(2906002)(107886003)(8676002)(41300700001)(4326008)(7696005)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?07OkPp/XGSR4aiG9GdPRQxg4y4jfHQKGhx9pzQ73Rp5uNVzwD9qTeHsVukRj?= =?us-ascii?Q?RuvXZFiR0KExE5Lw+8+IsodA8HlTVlywCRfrE2t+gIjmcaHthViJdObQkNnn?= =?us-ascii?Q?F4CNvDi9gLMpps7DNX+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= =?us-ascii?Q?gvKsTmrc2LXui6BqwZfarWYBlQO+y2SFrkQnBaNYY0ntR44hpkIvj8e4XuS8?= =?us-ascii?Q?kja1K9iqUvv5qJUwiqORwYY3ZxfY6ZJhH0wJZ2OOmpK7Hrxb4zHYrWvdem66?= =?us-ascii?Q?EDp9ThH7oTLkgST+8wVPlBKaSmi3Fu0SWH3+YJy5lARysGYTzzJhdQoB7YXz?= =?us-ascii?Q?2dlQzIWJaXfm+tw1XSuzscnU3fZYgpH61JxR8eErdZAykjCKjrYslbkiP5Uw?= =?us-ascii?Q?zDfz701WayjiKG9SoF5Vbd3RLoEybcekAyn4A3HT6qyZ/T9pKr6Mr8Jka9Zc?= =?us-ascii?Q?WiXbx1Sx69IjzOzxbNQqV/vLnFjz5Ccx+RYmHbnfOsNKrbcTSB6YNwXVA1f4?= =?us-ascii?Q?PNVV9dl6sLfkFtq/WDaDofz5z+nvtwm4hUUpM2Cjb3qbXexq86ohzGj5PkX7?= =?us-ascii?Q?bKtsKKFeNEWmEzvGWQmkoswwcSkFdh8A6ihSHplgneVpWwBoYYRdhDAyEjCu?= =?us-ascii?Q?+E5V/nT5Uz7ULrWOJwkdxJch5JQvBwdCf267gb6toP/ntIM7i9BzqZYIIeAU?= =?us-ascii?Q?AkiPLVCv/AwYxs8Z6u7ciFVwNOKLhNrqC1RreJAF?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3723.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b24cc084-73ae-4967-8f3c-08dab6f7f76b X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Oct 2022 02:15:35.0388 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 10ABJJacXyywLB1CoSe17GDYcV8BG7m9JIBd/cjVDFYpWR+mGyuJJv+GlOSnB44+a9/TprhG28j1hwW99nKtkA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4983 X-OriginatorOrg: intel.com 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 > -----Original Message----- > From: Stephen Hemminger > Sent: Tuesday, October 25, 2022 23:55 > To: Guo, Junfeng > Cc: Zhang, Qi Z ; Wu, Jingjing > ; ferruh.yigit@xilinx.com; Xing, Beilei > ; dev@dpdk.org; Li, Xiaoyun > ; awogbemila@google.com; Richardson, Bruce > ; hemant.agrawal@nxp.com; Xia, Chenbo > ; Zhang, Helin > Subject: Re: [PATCH v8 5/8] net/gve: add support for MTU setting >=20 > On Tue, 25 Oct 2022 17:07:26 +0800 > Junfeng Guo wrote: >=20 > > +static int > > +gve_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) > > +{ > > + struct gve_priv *priv =3D 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; > > + } >=20 > This check should not be necessary. > In rte_eth_dev_set_mtu it queries device for min/max mtu > then calls eth_dev_validate_mtu() to check that the mtu > is ok. Thanks for the comment. Yes, this part seems redundant with=20 _validate_mtu() for the same check.=20 Maybe better to update this as a bugfix later. Thanks!