From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0051.outbound.protection.outlook.com [104.47.37.51]) by dpdk.org (Postfix) with ESMTP id 2146611C5 for ; Tue, 21 Mar 2017 14:56:24 +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=KAGwt8+XnuVP7O2r9xCDH7BVi1rCrPLVBNadNpqww2Y=; b=TeoZ7OsxnY5dccvB+KRimobXQG7bIXbzS1A18H8zlv7gFeiPbFRfQaYqYktzawY2jw3e/Ht6RJhGD/te9lHuaLgssZEBG35XolMxMqj/G01P54xLCFwMQMTf78w3EA4q3PtwQhMuEAFGlrUlL0y6QuMIAdI19kQrrVLwZrVm9Sw= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (14.140.2.178) by SN1PR07MB2285.namprd07.prod.outlook.com (10.164.47.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.11; Tue, 21 Mar 2017 13:56:19 +0000 Date: Tue, 21 Mar 2017 19:26:03 +0530 From: Shijith Thotton To: Ferruh Yigit Cc: dev@dpdk.org, Jerin Jacob , Derek Chickles , Venkat Koppula , Srisivasubramanian S , Mallesham Jatharakonda Message-ID: <20170321135602.GA13505@localhost.localdomain> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5f7890d7-4714-9ceb-50b2-b548903fee9d@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: MA1PR01CA0081.INDPRD01.PROD.OUTLOOK.COM (10.174.56.21) To SN1PR07MB2285.namprd07.prod.outlook.com (10.164.47.155) X-MS-Office365-Filtering-Correlation-Id: b56da1a1-d6d5-442d-bc40-08d470620e63 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:SN1PR07MB2285; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 3:2Z+Bhz6BfRRGVWR45gXVDe7uPSlIPpdCFrxq5zBvSA+rnDCsN+b5LKyQjxDDHeEab7Amm+ZhzNDrvLmj812+10R0gISZLVDAhg4f1FxYJH8+MGqEgjszPveac4hZCDFRG11EFs32KVmvi+HqXPEH8gYYeqpW5vU6YNAdPqbqVsmaPyX7LcEGfCqPeGmsLLkBJ+h7xXW8JTqEkiqSetWFY8BbVxpHReAq6VQL+wZPkI2KG7rUHDeDq9sg4btJoRHmv9DQQb2Vd5Xutk/MS0bnKA==; 25:w+/zMWEK3U+yKlOZOPDWp3NyAPk76+nn2TeQ+VJ1ZB+7Ext3vXjQlahccB7LSOH3VJTi/3mSrtct3x0SqjCtWzCiF1rnoXmhn3CFIiAfAUlbEk0ZnQKA+Yb3FdJ16BMCmFDDdGbKZan+cS2CM6Cunc7h9+KaSOgoZIS8pXFHS0NkomfPqh/DSwcXEEu/kC6ht43Pfg87GIUnvf4QBNKv72mTzhh60Zr2T1T+D2O+iXN6tVdJnwdipvGEYfRenD98Xhy4X09Y0oXG2KdtLB3ZOlplolyC9an669lCpp0xljeNIvJ+X6TI+iIhbA8uYxcJa+2bWFtWM46nJKUx4gQyO2KybnKuiWPTN2OnjzkJYntrQS9F/jzBVtPYw8ijCwTquvemPlAEc6Vb3+fT3GOJfyWgu4/3ukTxC+eK0UG9CAjHycPg6mTWGQlrSQpxEqHAKaZr15UthH5upK9607WNwA== X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 31:wzPiyLXJGtSJ8JDkGZA7wUvOQiVionJKGq7MmrafZorCzhcj5rVnhnOQS/m18lDNzqtRBCSlKygdDAnmhFIQCFWVc66PHixiMM8Vt0lQOVaDXAnR5NGvTLqUpFqeeaGAB5BOtfuAL4Iqi9rDpM3icWaw6w0ZuXlVsoPkjSfkcd7V4h0M2QEX0puG6xPbnemwmVFkdwzmIKcmCOZpq+MG82NKN2P1mfku6TbvVgk5mGgZ3RFLOPgdE/FwfulxlPud; 20:n7pKl9secswdY/02uqYxegxBV+4/TcQxlK00dR694EuYCtXnzBQMpUWkhrYC+LnT/UVDQP+Wy1deE3JMKIoU3oqAdu989+2vlZwYhyU3A2OvEoARU6IgIRZvNQ3sfvZKW8Bkku8tPTczn84OXPbMM3DpxT71t0v/oDvZutV6MUGxZy9++V5d/T34XpVOKCAhHogYv3jZjtRd6jkEZCVyhKdA4Rt61q7+QYqsjKdNzQ0ITiGLVz1e9nLcRr+9hhMSF8Wdz9OsrpFdZ2Uacy3A1KLRjLxnLFH1UBFRK2sWACuNq3h4r2SvLqp6m9ouPIG1Db3QepO62L9v2FPedf/U58pAYVrMNSrNoP8cHry+bg5+x6ZiL1Q8f8P1WInNcBlbAlIEh9qJzfMEaZicmeAmBe21POo0i+/wlwZReHGar9GrAC3/o1kGgM8CU+1ar2OTPVZfh1xRUZFjxCVQRzJIWXytgyEApjz35K5XW9S0FJfQbxRkHJT6WVtpiz3DulvjqRCqiIcNZhTi509WP+IIIl41q4Rmthb1aAgNZMTr/L0/G/4H5ccg7Q5tUKXPF6EKTEj/0tEObCPKKybtEdbrBUvBFeF6pJuA/tJd+Pb9I6Y= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123558025)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:SN1PR07MB2285; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2285; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 4:bbZzfxR/r8mx0iOvX4wz4oNM5lS066eE01hveIn+F69XS9EZH9Z4Xa/Nz+ncAZWUNrIqGF2vaT2yI0xd/dL19Y0Mfh47JzScX9Xd2nMP+mmd1LCIyKmaKg2wxi8z8I7yd2wPnyce/xqi0csdAVWj+wPbVXvrMVhU6sss43s5SdD+q6dNkozSWPhfdW4RkMt9DJl4M2XLYg/ASdVJwY1zHipg6ZZ28QWaAY+stIj4kz8o0YelAxSFCp0du9Al2A2CcH4k7mEdaefOU7lbGJkUs473JDPMrv8rDBmBSm82D44A07Qiiw85ufGRRxb0B/sd+NouyHWAx6O0cUmGHbWwggznCeo6oRI5/35OiNn6gKMRgH21pHwoup0SZixv5u8RVJWuJ4+bxS6rLdFje9BvOozFYylWxwcY0gWg8Bp+XeYvehzlbPh/H6kUTSuvpSoSTZmCaJHdWCujUGzHESkDnNxhCt39ekNFWR2TBW1WFc4lSJOxXrBjYjbd4cS59avew9qI6z/3FXY4sJmvCpS8Vvu3ZULj9QQAVH8EzycllsoNqA88xk5ebe1hBNPBdneZjAZ7uAS/QWchPRVcJSKylBjzWdTxLSOL2BYf7pUyhto= X-Forefront-PRVS: 02530BD3AA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39410400002)(39830400002)(39450400003)(377454003)(199003)(189002)(24454002)(61506002)(50986999)(54356999)(76176999)(6666003)(8676002)(6246003)(38730400002)(33656002)(42882006)(110136004)(6916009)(2950100002)(42186005)(53936002)(6506006)(54906002)(55016002)(66066001)(9686003)(25786008)(47776003)(5660300001)(50466002)(189998001)(229853002)(93886004)(83506001)(53546009)(23726003)(305945005)(7736002)(5009440100003)(1076002)(6116002)(81166006)(4001350100001)(2906002)(4326008)(3846002)(110426004)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2285; H:localhost.localdomain; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB2285; 23:ekJMwK5c+zXVGG3SlGS4L0ItvZwU/v3C8Bi9nHBjM?= =?us-ascii?Q?gQPUkhiB0Hn7Z+WsnTQlIViU4joEGRJi0CTKj8gRbLxp68tjqmetuSoZZQDo?= =?us-ascii?Q?5Jn8N4AppW9Xj8ILPrBXbbsP4b8EZsmCCStxuU9lsjX3BQD4GbXHJqDXItrM?= =?us-ascii?Q?+Wo+n6JVC5DlZvXiiNTIzEipYh9ycWPU8WFTVz70IYw60m7diVWKKg1YsnnH?= =?us-ascii?Q?1eQOYnnj88ZQFsgVXUWNtn2Sum5wFMNIrtb4kwKMC81w9r/PVbH5IV2H0N//?= =?us-ascii?Q?7qVxHHbdkFyVgy0ONcujvEjTlSA9WqMjG5hQhnVJgnND8raG9QamACKuYOrL?= =?us-ascii?Q?rWUDjyfedR1vkQ2ubHod43ZklO4ABWptATFQPb2hM6szHkxtYUi8q/8TyMT+?= =?us-ascii?Q?HUoiaUHte238Ayll5A01JvQsCeKO0e66NVhZA7V8iHhyO5+01h5qInR0rscx?= =?us-ascii?Q?TgiLq9brwZCaAxv9gKW1Jc/EivZBUXZl52bATsvtiISFS+9l22MeEUK2gYCT?= =?us-ascii?Q?gME7WBwQq+vwIkE81oRjAEqbYZkPmIVF2zEktoNzjhqr4t4dHJ1t8jncWZDD?= =?us-ascii?Q?gDN8OhU+lxR9A+/EYwVDD1p+LvELallWYUGyxvRUJD1QlZGQ+bLPtBJnAXW0?= =?us-ascii?Q?vl0WQqOg7/49VgQ8z+qLPgRMPeNCm93W8AuZtfJZxypeBM7FLdPljlU53daS?= =?us-ascii?Q?ogKU85x196SYYT4Mp5RCPOpEGCxzHjHLwTxDsnyEx1M/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KPAB2c0iUhFosKR4ILZx5KTrl5okWg==; 5:847Z5c2PNFWknfwI1iAsfk6K33wLOx3ZGp97jpxnSr7MpV+dqsF0ElOhS0iA2OA6hsayDhUdySH1txyPrjsFWnT/YhiXGSbP6w7h4gDZrBZUd9z5U88sTz7H9/to+tP3kKi6GK4ZYDoDDuiucuXMcQ==; 24:yB34LVuGflV+ACQtX6XdDPd6z/VSp+BUCyYitHFrAUbFCv4HqXiJoMSEQPPFTeXn0kF4QlBpgeLRqMrLCnPsrgEpI2E+hKhIVXa0i/sYLHc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2285; 7:rpZjuryNCv3ETv28dP5esKbzSbc7JP9XA1SX3ndHJR0EdeffzsYUPVSTshAnvyu+XrbN6PzsmdEk6DDqgxhI/kBTemfg+I+JjrLhe8j/haQGpQ6v/ieSLhChep/BmichW8EGcRwyb+v7ipN1jhChvig8SWps6qyrnV93u6OAvI3C94zRSJGvWcao9/n3fuAnhp6ygfUEzPF64qggqnQG34sigIjGD8tPJSDl2c/100oBUywBZ2p9PTE7b2HMZMOxjr7MKu5oKfYe+T8G48zYBQng1aP66RO7HSJkFg0ooJll6MMQbj3jb2OTNM78ijLzM0l4jF78wfXTW1gbvl0zjA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2017 13:56:19.1735 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2285 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: Tue, 21 Mar 2017 13:56:24 -0000 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. > > 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. > <...>