From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 852C02BE1 for ; Wed, 28 Jun 2017 17:45:59 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jun 2017 08:45:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,276,1496127600"; d="scan'208";a="1165698412" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.91]) ([10.237.220.91]) by fmsmga001.fm.intel.com with ESMTP; 28 Jun 2017 08:45:47 -0700 To: Shreyansh Jain , dev@dpdk.org Cc: hemant.agrawal@nxp.com References: <1497591668-3320-1-git-send-email-shreyansh.jain@nxp.com> <1497591668-3320-26-git-send-email-shreyansh.jain@nxp.com> From: Ferruh Yigit Message-ID: Date: Wed, 28 Jun 2017 16:45:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1497591668-3320-26-git-send-email-shreyansh.jain@nxp.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 25/38] net/dpaa: add support for MTU update 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: Wed, 28 Jun 2017 15:46:00 -0000 On 6/16/2017 6:40 AM, Shreyansh Jain wrote: > Signed-off-by: Hemant Agrawal > Signed-off-by: Shreyansh Jain <...> > static int > +dpaa_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) > +{ > + struct dpaa_if *dpaa_intf = dev->data->dev_private; > + > + PMD_INIT_FUNC_TRACE(); > + > + if (mtu < ETHER_MIN_MTU) > + return -EINVAL; > + > + fman_if_set_maxfrm(dpaa_intf->fif, mtu); > + > + if (mtu > ETHER_MAX_LEN) > + return -1 Is it OK to have this check after fman_if_set_maxfrm() ? > + dev->data->dev_conf.rxmode.jumbo_frame = 0; > + > + dev->data->dev_conf.rxmode.max_rx_pkt_len = mtu; I think this only makes sense when jumbo_frame is 1, although not hurts to set... > + return 0; > +} <...>