From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id C9E255689 for ; Tue, 21 Mar 2017 13:24:52 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 21 Mar 2017 05:24:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,198,1486454400"; d="scan'208";a="79374733" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.122]) ([10.237.220.122]) by fmsmga006.fm.intel.com with ESMTP; 21 Mar 2017 05:24:50 -0700 To: Shijith Thotton 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> Cc: dev@dpdk.org, Jerin Jacob , Derek Chickles , Venkat Koppula , Srisivasubramanian S , Mallesham Jatharakonda From: Ferruh Yigit Message-ID: <9a8d31ce-8590-25f3-eab8-6a34e4a645a2@intel.com> Date: Tue, 21 Mar 2017 12:24:49 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1488454371-3342-37-git-send-email-shijith.thotton@caviumnetworks.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit 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 12:24:54 -0000 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?