From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 9DDF1A0679 for ; Wed, 3 Apr 2019 14:36:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 030161B39E; Wed, 3 Apr 2019 14:36:30 +0200 (CEST) Received: from rcdn-iport-6.cisco.com (rcdn-iport-6.cisco.com [173.37.86.77]) by dpdk.org (Postfix) with ESMTP id 358E91B293 for ; Wed, 3 Apr 2019 14:36:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3752; q=dns/txt; s=iport; t=1554294988; x=1555504588; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=qISr0Cclr1vjo5M2XNmyy4Ecjes5XbW9QX+CcI4yUwI=; b=KagAECYgsBaSIv2bRJxMU7P95KFlzMW2uTPb69JoqqZzpQ34zdEGvg6F YBO9KYdlgS5CSOlVNey8cvtHht4ZvOuXNReiCaDmsWqLwlmjaBXYkXMUu 3BllGM6BNnVsPfnFvMU/WrNNMQ3uWRR1xiVDdQarxF6mNlIN3Wljqs8lQ w=; IronPort-PHdr: =?us-ascii?q?9a23=3Aj4+d0R1hOC35Ct6+smDT+zVfbzU7u7jyIg8e44?= =?us-ascii?q?YmjLQLaKm44pD+JxKHt+51ggrPWoPWo7JfhuzavrqoeFRI4I3J8RVgOIdJSw?= =?us-ascii?q?dDjMwXmwI6B8vQBU3yNuLtaQQxHd9JUxlu+HToeUU=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0ADAACCqKRc/5hdJa1lGQEBAQEBAQE?= =?us-ascii?q?BAQEBAQcBAQEBAQGBUQQBAQEBAQsBgT1QA4FcBAsnh1UDhFKKT4JXlxGBLoE?= =?us-ascii?q?kA1QOAQEshEAChUQiNAkNAQEDAQEJAQMCbRwMhUoBAQEBAgEnEwYBATcBCwQ?= =?us-ascii?q?CAQgRBAEBHwkHMhQJCAIEAQ0FCIR4Aw0IAQKiPwKKFIFtM4J5AQEFhH8Yggw?= =?us-ascii?q?IgS8BizIXgUA/gVeCTD6ERoM5giaKUpsUCQKUEJRGi0uTaAIEAgQFAg4BAQW?= =?us-ascii?q?BTTgogS5wFYMnggqDboNrhmhyAYEnjxcBAQ?= X-IronPort-AV: E=Sophos;i="5.60,304,1549929600"; d="scan'208";a="543174661" Received: from rcdn-core-1.cisco.com ([173.37.93.152]) by rcdn-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 03 Apr 2019 12:36:26 +0000 Received: from XCH-ALN-006.cisco.com (xch-aln-006.cisco.com [173.36.7.16]) by rcdn-core-1.cisco.com (8.15.2/8.15.2) with ESMTPS id x33CaQ6T024901 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 3 Apr 2019 12:36:26 GMT Received: from xhs-rtp-002.cisco.com (64.101.210.229) by XCH-ALN-006.cisco.com (173.36.7.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 3 Apr 2019 07:36:26 -0500 Received: from xhs-rtp-002.cisco.com (64.101.210.229) by xhs-rtp-002.cisco.com (64.101.210.229) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 3 Apr 2019 08:36:25 -0400 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (64.101.32.56) by xhs-rtp-002.cisco.com (64.101.210.229) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 3 Apr 2019 08:36:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector1-cisco-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=orbImgRprQ9T9tKgN8Xf9OqHpXDY2nTLf+nnq1ZoxvI=; b=B46Fsak/Q8AROU6fQbzZvBjpwYg8bugyJI8B7LXgh7qlsPd26gr5WDh5hxUmeYWvMYCr3WwZcl+a9ecz/VRoZhE6VJVbDRR/pCX8ySlBmt4CXp3RnSM8sUNr9mqOdupb3IdTdi27zsRFLlFwCnm6p1jRv9ivy7wVwYfqJkftzGA= Received: from DM6PR11MB3961.namprd11.prod.outlook.com (20.176.124.154) by DM6PR11MB2604.namprd11.prod.outlook.com (20.176.99.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.22; Wed, 3 Apr 2019 12:36:23 +0000 Received: from DM6PR11MB3961.namprd11.prod.outlook.com ([fe80::dd8a:6679:9313:14bf]) by DM6PR11MB3961.namprd11.prod.outlook.com ([fe80::dd8a:6679:9313:14bf%3]) with mapi id 15.20.1750.014; Wed, 3 Apr 2019 12:36:23 +0000 From: "David Harton (dharton)" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "Lu, Wenzhuo" , "Ananyev, Konstantin" , "Zhang, Qi Z" Thread-Topic: [dpdk-dev] [PATCH] net/ixgbevf: remove MTU setting limitation Thread-Index: AQHU6bszz1zxYSLwZ0+wJWQKZJEQg6YptZ0AgACm2KA= Date: Wed, 3 Apr 2019 12:36:23 +0000 Message-ID: References: <20190403011833.20428-1-dharton@cisco.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dharton@cisco.com; x-originating-ip: [2001:420:c0c4:1001::14d] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 93eb232c-3017-4492-8807-08d6b830fb82 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(2017052603328)(7193020); SRVR:DM6PR11MB2604; x-ms-traffictypediagnostic: DM6PR11MB2604: x-microsoft-antispam-prvs: x-forefront-prvs: 0996D1900D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(376002)(136003)(39860400002)(366004)(346002)(189003)(13464003)(199004)(478600001)(53936002)(81156014)(53546011)(316002)(76176011)(486006)(99286004)(6506007)(74316002)(446003)(476003)(11346002)(25786009)(71190400001)(7696005)(229853002)(4326008)(71200400001)(305945005)(81166006)(46003)(8676002)(2501003)(7736002)(52536014)(106356001)(86362001)(105586002)(256004)(2906002)(5660300002)(6436002)(97736004)(110136005)(33656002)(54906003)(6116002)(9686003)(6246003)(14454004)(55016002)(186003)(68736007)(8936002)(102836004); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR11MB2604; H:DM6PR11MB3961.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: A6US/YqaMoc/O+4pHMSYW0MHV/9eDWRB/Rw67FczkAV6X+7Tj97Lh6C/7V29+W3305QfvUBWKdmY4V3J/WOPhEEBE87hPltMZnZd2iMSzyyTXxBz1ksTox8LMsUKvN0zOaQJoeZcGX3Kg/KbtgjJYFVcDKbQ4muGFkwZMDuJBhl2BCp+BlwtvVNyzD4+NfrTfDFbb10WQ7N6/NhojglgJNVFVTETGHfg9Nkv5yiYOOCe3Yh9QSjuefM4dQSfMnaoskCKaVyyAsyM9RF/jU9pshUvCfAWtO4sMnMKzPD0j5Xy5wQM1JOw/BLYPi7mzvpwoNk/eVBlE5WMa/KA2jezePV10QrVKbZIMUaAEarcM2yDjR5mjbKuuFa2d9thnKtvZG+rHdmWwQYtm3OFaOZTZrZ92Zd6bIx15JS8+isO9Qg= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 93eb232c-3017-4492-8807-08d6b830fb82 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Apr 2019 12:36:23.4859 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2604 X-OriginatorOrg: cisco.com X-Outbound-SMTP-Client: 173.36.7.16, xch-aln-006.cisco.com X-Outbound-Node: rcdn-core-1.cisco.com Subject: Re: [dpdk-dev] [PATCH] net/ixgbevf: remove MTU setting limitation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190403123623.I3tph3Dlp3n8OkynvPJeNu6-bSiNyP4rYcdkfDssu9w@z> Hi, > -----Original Message----- > From: Zhao1, Wei > Sent: Tuesday, April 02, 2019 10:26 PM > To: David Harton (dharton) ; dev@dpdk.org > Cc: Lu, Wenzhuo ; Ananyev, Konstantin > ; Zhang, Qi Z > Subject: RE: [dpdk-dev] [PATCH] net/ixgbevf: remove MTU setting limitatio= n >=20 > HI, >=20 > Why not add some more code > " > if (rx_conf->offloads & DEV_RX_OFFLOAD_SCATTER) > dev->data->scattered_rx =3D 1; > " >=20 > Into ixgbevf_dev_rx_init() to enable scatter mode when start device? I don't think it's necessary is it? Doesn't this code in ixgbevf_dev_rx_init() handle it? if (rxmode->offloads & DEV_RX_OFFLOAD_SCATTER || /* It adds dual VLAN length for supporting dual VLAN */ (rxmode->max_rx_pkt_len + 2 * IXGBE_VLAN_TAG_SIZE) > buf_size) { if (!dev->data->scattered_rx) PMD_INIT_LOG(DEBUG, "forcing scatter mode"); dev->data->scattered_rx =3D 1; } Regards, Dave >=20 >=20 > Reviewed-by: Wei Zhao >=20 >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Harton > > Sent: Wednesday, April 3, 2019 9:19 AM > > To: dev@dpdk.org > > Cc: Lu, Wenzhuo ; Ananyev, Konstantin > > ; David Harton > > Subject: [dpdk-dev] [PATCH] net/ixgbevf: remove MTU setting limitation > > > > Currently, if requested MTU is bigger than mbuf size and scattered > > receive is not enabled, setting MTU to that value fails. > > > > This patch allows setting this special MTU when device is stopped, > > because scattered_rx will be re-configured during next port start and > > driver may enable scattered receive according new MTU value. > > > > After this patch, driver may select different receive function > > automatically after MTU set, according MTU values selected. > > > > Signed-off-by: David Harton > > --- > > drivers/net/ixgbe/ixgbe_ethdev.c | 12 +++++++----- > > 1 file changed, 7 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > > b/drivers/net/ixgbe/ixgbe_ethdev.c > > index feec85634..0b962c8db 100644 > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > > @@ -6346,20 +6346,22 @@ ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, > > uint16_t mtu) { > > struct ixgbe_hw *hw; > > uint32_t max_frame =3D mtu + IXGBE_ETH_OVERHEAD; > > - struct rte_eth_rxmode *rx_conf =3D &dev->data->dev_conf.rxmode; > > + struct rte_eth_dev_data *dev_data =3D dev->data; > > > > hw =3D IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > > > > if ((mtu < ETHER_MIN_MTU) || (max_frame > > > ETHER_MAX_JUMBO_FRAME_LEN)) > > return -EINVAL; > > > > - /* refuse mtu that requires the support of scattered packets when > > this > > - * feature has not been enabled before. > > + /* If device is started, refuse mtu that requires the support of > > + * scattered packets when this feature has not been enabled before. > > */ > > - if (!(rx_conf->offloads & DEV_RX_OFFLOAD_SCATTER) && > > + if (dev_data->dev_started && !dev_data->scattered_rx && > > (max_frame + 2 * IXGBE_VLAN_TAG_SIZE > > > - dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)) > > + dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)) { > > + PMD_INIT_LOG(ERR, "Stop port first."); > > return -EINVAL; > > + } > > > > /* > > * When supported by the underlying PF driver, use the > > IXGBE_VF_SET_MTU > > -- > > 2.19.1