From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0062.outbound.protection.outlook.com [104.47.42.62]) by dpdk.org (Postfix) with ESMTP id 4B0F71094 for ; Thu, 23 Mar 2017 06:02:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1GOIn7QOrt7LDMS6lID/MZN9JGuWSKnwotHTlRhTVuU=; b=chkCH0jHIRRAom6sKJlUE2kPqkMC1EEnHc8+brATufi8HKRfICG2IbSgJIVOVC4Dw8mmKnYZZWVJFTg3widFNnH3H6li41OPV821kfxVSah2zZIFptVN03Hy/F5m2z69yVJrKrKOMj/lQi4SfM+KSnILV6SdjOijAGrIQoxfGdA= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from hone (14.140.2.178) by SN1PR07MB2287.namprd07.prod.outlook.com (10.164.47.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.11; Thu, 23 Mar 2017 05:02:21 +0000 Date: Thu, 23 Mar 2017 10:32:01 +0530 From: Shijith Thotton To: Ferruh Yigit Cc: dev@dpdk.org, Jerin Jacob , Derek Chickles , Venkat Koppula , Srisivasubramanian S , Mallesham Jatharakonda Message-ID: <20170323050159.GA2350@hone> References: <1487669225-30091-1-git-send-email-shijith.thotton@caviumnetworks.com> <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> <1488454371-3342-37-git-send-email-shijith.thotton@caviumnetworks.com> <9a8d31ce-8590-25f3-eab8-6a34e4a645a2@intel.com> <20170321125321.GA13113@localhost.localdomain> <5f7890d7-4714-9ceb-50b2-b548903fee9d@intel.com> <20170321135602.GA13505@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: MA1PR01CA0017.INDPRD01.PROD.OUTLOOK.COM (10.164.117.24) To SN1PR07MB2287.namprd07.prod.outlook.com (10.164.47.157) X-MS-Office365-Filtering-Correlation-Id: c8c289a8-6420-4f23-f3b6-08d471a9cbb9 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:SN1PR07MB2287; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2287; 3:ueCfoOvgZwPgOwUaxFCcC1p4XXPfktrbscGST/URbvWn8+x0vwl3r0kl3pRj7gfGARGW/zQZIx3CvMKOsHNNai9z5yDWqKdQua7gw7o6MKjok6Ok21nEyYYdIsc4KP4Qbe7ge1OvGTOP1K8jee3m4c4gbATi7pqamj/hBKW+8lLSesN09JBBHmwVwIla0tnmVkUpzFkNc2O2nfINB8YFVD7B/Hlc/0vpDPY5v4gZqJKcCVA9VIhjnlnxXYznkrX3CBx3SzC6oX7MH75kZSNS7Q==; 25:8J9zd4e+gCNapDfH4osuigE34xCPSGmIjq89ORdIAbvWNL6hRn8KoWlBcbH81QpxAfIbe7XRnDiez7XjS6mtOIPaunfFlJ8atBV8NTmg4rQmxI+UVsPUYtFOw8dUpl4dlHTXoabG71nt8qcy1MnfXUMVxn9JAR0o9da7lqnK6cOyTJvEaB+1ym3lBfGtRdHB1tEl9rjIB7UmCjd9bkiwlxhP8ETjIosDKuTwhZAniFnVroK97Y0NfRYaprU4acDuOIU0mgwKQNhcwJXWEmUfVQ/OePr127i3Xtg+pcDzol3DDGX9ZcBr4nmyT6xLNItudYBEnTH77bfOGh4E8nAaMlrQrMbbbnz/XZVjE7lg7cDjoGraLiADkXIOlL/35QkE3JAASPUnNX595SLa463JqfaocgdnjXfqlWI3RbMbcYh+j9a11FiohDrpGduggSEtKFjG9PZLla9iFde4F3kAWg== X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2287; 31:MY4oRLmhk5xxSzoA0FxWeA19e4kedskVvyKLSxWPdLZzQn9A3zXdx8hgSP96OuJT3p5oeXoecoQtDxaCk/zNanK/2pxeOaJjVJEVDWCYTJ/K6I+tJiKRYA7j7+I7oEhW57rwksSeddzB/6ONZg6GcqwxVWrS8m+h/r3FBqB/f7zZLQLo78R1VW9nde5m2MifLkJYyLmSx/1E+r8gOMgt1G7YBC+3yyMRaIesTWwfoSyB1aNyNGczRTrNMUN91Cr/; 20:ZdXAusaoYKZKld1DhO+wPgAs2eqcCDZhU69YicVoHW7MvLAP80R9y31Gvl73/X1VWP4yAi207/sK/J68wHMTx+szmNebIdh2CYmi/6cWcSZ9IPQeLW3i2MC31C4pVdfE6nzlUGoOIt932KQ51KqnbUnSe/sNgPwT90sazWbvBR0XDrSwtCXloM3lXTcvMewUyQEEF96n6PZeHtRqiNUhVRPQMiQDBrudtzRIHSTw/NFkHqobtn1VzkNTAORSBVEAYexO2G2ngdnFeFi8aGfvmKVrSQX71gGeLxSGC8+LjYon4mC8jz4lBAr30yQ6NyxJ2fiwQLq7Gjmqz7D5R+Z7PC45mbsFE295RtsvFdK2CP+COv4mrqMu3iWJ8FdopvXf0+VkXesuadvNYKz+FfybpVz0gHnP4hAGR1iQ7QOgSSVukX0KhDXRiPkMrjRjY9PGNt0W/3iINx5gjAM3L17Gvxe0ZtKxJgSxXrNa76NzRkMYggGLV4FH5j2oxNSTj43GOThwcMsg+UoHSEik+ROVnzbN2Fkv6DLlSpK8T5U6J/Pad/pxycBG8Hv16WSxeCNOf96k5EhhqHIszSmCRhdaIdBMWUOTnDE26VILV8F8DcA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123555025)(20161123560025)(20161123558025)(20161123562025)(20161123564025)(6072148); SRVR:SN1PR07MB2287; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2287; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2287; 4:zCbcaCYpp1erccCCKyU7O9/GiPLV6v971aL1dPHd52cwzFxuZvqg30JHjGM0NID84ckQU1rNRU1jkXUjZOT3geCHoNr5Q/maZDPYkqbLa8azTi9mWlZPjP/VFWVtdZCWGMjFs7a81FbOX8rw+7LjBUsG7FWu16fUZ1gWDttpOn4vMQnv4E4VIt+RtVpIlpzZtoXaDUK3WGsMpP7uHwhZQT/tIWvJxorKh0wkBIHrnDmBc7j/eYmcoCy54uXCl8hgiYaWyfohZOE4YcPdcWljoM9y8DJHAftT4sMw61Mj+b2MiKaAlMjCTZPAtUewLpzeSEEGmyMtjSQC1cjKyUpADfavNUeWI4gLsqzyYCKXikWMKI/QEeKCkL28DzM5jvaWyddunjWGd8Rj3zm5kZRk5wUHWlbP1trjxsr2p88S7lC4Fa8Z6vVOI68tjGb86MnPuaJUNw3reaXDVVGfFsIyMLhE2Bfxey24GeSw+g32TLdv/TnVW5JrMcGB/hGtRuIcUugH2IgNWgMWLA3p19R4X/+KAb1bKz0QTGGswgTVJ4U1rbgRi4xMVmsfWnLDX60Zh8aK11MMdL4mKu9y3tHGBAmDunNlogQn6Z4+DZzkcKw= X-Forefront-PRVS: 0255DF69B9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6009001)(39410400002)(39450400003)(39830400002)(24454002)(377454003)(110136004)(81166006)(305945005)(53936002)(8676002)(3846002)(33656002)(189998001)(1076002)(9686003)(5660300001)(55016002)(93886004)(50466002)(229853002)(25786009)(6116002)(6666003)(54906002)(4326008)(2906002)(54356999)(42882006)(50986999)(76176999)(33716001)(38730400002)(23726003)(6916009)(2950100002)(5009440100003)(42186005)(83506001)(53546009)(6496005)(6246003)(7736002)(47776003)(4001350100001)(66066001)(110426004)(18370500001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2287; H:hone; FPR:; SPF:None; MLV:ovr; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB2287; 23:TTXrnZ1iKKFDSmZDNNYCoHNAMksHMztDJx27O9Az9?= =?us-ascii?Q?RN4lapfDViwxu7M/vhLqOzqfGw6iUnsvnXPtLAuwjEOAH5EZy5pyWJ0o7na6?= =?us-ascii?Q?rfSQNX/SAGQNpRaMkeeVf0LKO/egTrb/SKqZqWkuc3Nvv3F9gPWE4RFW+VHe?= =?us-ascii?Q?ejEpul4aAImvZpE31R64GBXvKVUkV3/iMrPlbbWsWfgfStMH1QzgjsVv2ZyN?= =?us-ascii?Q?OQZOUuKi6//Lli2OMvHcm5dqCmVoa+q2YzHjueoQajljou8zQZbk+xIz1lGD?= =?us-ascii?Q?zKF0ziqfLsHppS9Ghq7o9+KLnQuWmzSu+SHN59ra75v2kOov1F681i/2YQei?= =?us-ascii?Q?URHzOvj1hk+iMGOaIZL0Z2TOjI5dD5ky3Lz1EZ2IFNjildBpF39Zwa66KNaB?= =?us-ascii?Q?7uTHYYv2LGRhLVkquQE/Hg3b1nklA8mMy/jZZ49liXBlL4ythnnHfdexldSj?= =?us-ascii?Q?ldz8sNGunqZyzPoNDQw4cGi7rGkioXE1d8d50OrR7jfO/y+u/HKfsDtO174V?= =?us-ascii?Q?CobhH0Yd6K71JOJf8mTvamBjOXP80TNDODjgeSHd9+1zuZevD3+wC779yVK7?= =?us-ascii?Q?HNZ5ndw8Uc+zunDSPWxvo/CONLtPIt21T1qeXfAqISpSwOCRYjAISc7wv2NG?= =?us-ascii?Q?stYTT6/unB1qwA9z2zVrg4L9NraBLaTALAMxBh8QcIU9LHohBX0svUn2ll+x?= =?us-ascii?Q?C6RM1RFCcxx7qTk29tVvksl1kXWkTaZeCWWmFSYx0c6FM8hy4a1MHsH5atXB?= =?us-ascii?Q?xd2ZBdlFuGKigbQ2MjsKtwxhbHNhPG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4EyzfqhEAtEETVDMvJa97JH/5A==; 5:AUcWHsDHptOca1/AWQN/rg8SYKxj2r/Wh5mjLjQoNzviFEnzfvIHvb0cB6fedNmvbFTxjBF+X8QFKTo8wJUNF07Un0kFDlH7aIggoGJ5KcXVRNxrz3EJsRgtFv7+T83j6X3LKa0AXT0Q2IgM3ctndg==; 24:Poiv6VbuDjM051USUdjpTiRUyT9gyKxyRNItrDk3ipLo2c5zELjRJAgjJGdYzyh1ACEj6lQmL+dWaBhAJYuWtDXRhxJeA+NBWUL20kxJBzQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2287; 7:KeTxoaShW1yxmiYv/4TrhbLuC7VRfhcklwRlr6r3M9sbAp8Oy2SUVchRkhu48rFhTLWaw4i50ZZihk/0uB0s1z9ClbT9cQPcst5PUaXnkY1fvzAv0RMPjnSkRHbhMryAIiKNFXi10uMQQh1CwUnx1WhISEPFFJ1jG7RsKzJLx/Zdbc9rfjVtzrebd4T8JSgRxr9B2P1cJIF97+xUr4XM32J9Y8AY07NhWb/vxH/wwHIyLSGw2jJVzIZIT1U7ImfiD2NwNHiheparQ5dj3yqRQ3qW8tNVBeIi8EBGGsE3MeVRpPuFqfVNJFHGIS0ik3deof8EiNHJejgWAGVAp2JXTw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2017 05:02:21.1475 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2287 Subject: Re: [dpdk-dev] [PATCH v2 36/46] net/liquidio: add API to set MTU 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: , X-List-Received-Date: Thu, 23 Mar 2017 05:02:27 -0000 On Tue, Mar 21, 2017 at 02:09:44PM +0000, Ferruh Yigit wrote: > On 3/21/2017 1:56 PM, Shijith Thotton wrote: > > On Tue, Mar 21, 2017 at 01:01:58PM +0000, Ferruh Yigit wrote: > >> On 3/21/2017 12:53 PM, Shijith Thotton wrote: > >>> On Tue, Mar 21, 2017 at 12:24:49PM +0000, Ferruh Yigit wrote: > >>>> On 3/2/2017 11:32 AM, Shijith Thotton wrote: > >>>>> Signed-off-by: Shijith Thotton > >>>>> Signed-off-by: Jerin Jacob > >>>>> Signed-off-by: Derek Chickles > >>>>> Signed-off-by: Venkat Koppula > >>>>> Signed-off-by: Srisivasubramanian S > >>>>> Signed-off-by: Mallesham Jatharakonda > >>>> > >>>> <...> > >>>> > >>>>> > >>>>> static int > >>>>> +lio_dev_change_vf_mtu(struct rte_eth_dev *eth_dev, uint16_t new_mtu) > >>>>> +{ > >>>>> + struct lio_device *lio_dev = LIO_DEV(eth_dev); > >>>>> + > >>>>> + PMD_INIT_FUNC_TRACE(); > >>>>> + > >>>>> + if (!lio_dev->intf_open) { > >>>>> + lio_dev_err(lio_dev, "Port %d down, can't change MTU\n", > >>>>> + lio_dev->port_id); > >>>>> + return -EINVAL; > >>>>> + } > >>>>> + > >>>>> + /* Limit the MTU to make sure the ethernet packets are between > >>>>> + * ETHER_MIN_MTU bytes and PF's MTU > >>>>> + */ > >>>>> + if ((new_mtu < ETHER_MIN_MTU) || > >>>>> + (new_mtu > lio_dev->linfo.link.s.mtu)) { > >>>>> + lio_dev_err(lio_dev, "Invalid MTU: %d\n", new_mtu); > >>>>> + lio_dev_err(lio_dev, "Valid range %d and %d\n", > >>>>> + ETHER_MIN_MTU, lio_dev->linfo.link.s.mtu); > >>>>> + return -EINVAL; > >>>>> + } > >>>>> + > >>>>> + return 0; > >>>>> +} > >>>> > >>>> Is this really sets the MTU? > >>>> "new_mtu" seems not used, except limit check, an lio_send_ctrl_pkt() > >>>> required perhaps? > >>> > >>> It won't set MTU for hardware and is possible only by PF. So > >>> lio_send_ctrl_pkt is not required. VF MTU is limited by PF MTU and is > >>> mentioned under limitations in driver documentation. Here we are > >>> allowing upper layer to set MTU up to the value configured by PF. > >> > >> I see, but lio_dev_change_vf_mtu() does not set anything at all. If it > >> is not modifying anything at all, why you claim "MTU update" supported? > > > > We allow update for the upper layer till the value supported by PF even > > though there are no real MTU update happening at hardware level. > > Thought it is ok to have it mentioned under limitation. > > Two options are: > > 1. mark support as partial. > > 2. remove this patch and support. > > > > Please suggest which one is better. > > If I get it right, it is not possible to set VF MTU, so I would suggest > removing MTU update support. OK. > > But you may want to keep the patch for MTU validation, and change > function name according. Will change set to validate. > > > > >> > >> And following logic seems wrong for this case: > >> > >> ... > >> if (lio_dev->linfo.link.s.mtu != mtu) { > >> ret = lio_dev_change_vf_mtu(eth_dev, mtu); > >> ... > >> > >> Should this functions set lio_dev->linfo.link.s.mtu at least, perhaps? > > > > lio_dev->linfo.link.s.mtu represents the MTU supported by the device and > > it gets updated if there is a change by PF. > > So, "lio_dev->linfo.link.s.mtu" is device MTU set by PF, "mtu" is VF > eth_dev configured value. > If they are not same, lio_dev_change_vf_mtu() does check if "mtu" is in > valid range and return success or failure, right? > So, this is just configuration validation, nothing changed/set here. > > > > >> > > <...> > > >