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 54A0BA00E6 for ; Thu, 21 Mar 2019 13:57:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 572B31B4D5; Thu, 21 Mar 2019 13:57:37 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 7C7231B4CF for ; Thu, 21 Mar 2019 13:57:36 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Mar 2019 05:57:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,252,1549958400"; d="scan'208";a="309125561" Received: from istokes-mobl1.ger.corp.intel.com (HELO [10.252.18.62]) ([10.252.18.62]) by orsmga005.jf.intel.com with ESMTP; 21 Mar 2019 05:57:33 -0700 To: Ferruh Yigit , dev@dpdk.org Cc: stephen@networkplumber.org, Qi Zhang , Helin Zhang , Beilei Xing References: <1551303948-19746-1-git-send-email-ian.stokes@intel.com> <1551303948-19746-3-git-send-email-ian.stokes@intel.com> <2784e21c-51f2-c18f-6f26-3586fb4a5133@intel.com> From: Ian Stokes Message-ID: <443c11f2-25f4-4568-b797-f89cad1f0498@intel.com> Date: Thu, 21 Mar 2019 12:57:32 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <2784e21c-51f2-c18f-6f26-3586fb4a5133@intel.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1 2/6] net/i40e: set min and max MTU for i40e devices 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: <20190321125732.sam42byUkirITM4hgRxY8oHtA3-8-C2vTMzHWWWTIOA@z> On 3/19/2019 4:18 PM, Ferruh Yigit wrote: > On 2/27/2019 9:45 PM, Ian Stokes wrote: >> This commit sets the min and max supported MTU values for i40e devices >> via the i40e_dev_info_get() function. Min MTU supported is set to >> ETHER_MIN_MTU and max mtu is calculated as the max packet length >> supported minus the transport overhead. >> >> Signed-off-by: Ian Stokes >> --- >> drivers/net/i40e/i40e_ethdev.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c >> index dca61f03a..caab1624f 100644 >> --- a/drivers/net/i40e/i40e_ethdev.c >> +++ b/drivers/net/i40e/i40e_ethdev.c >> @@ -3499,6 +3499,8 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) >> dev_info->max_rx_pktlen = I40E_FRAME_SIZE_MAX; >> dev_info->max_mac_addrs = vsi->max_macaddrs; >> dev_info->max_vfs = pci_dev->max_vfs; >> + dev_info->max_mtu = dev_info->max_rx_pktlen - I40E_ETH_OVERHEAD; > > 'I40E_ETH_OVERHEAD' [1] is the max overhead, when VLAN and QINQ is not > configured, we are wasting 8 bytes, should we try to be more fine grained when > setting the max_mtu? Does it worth the complexity? > I'm not against this, but for this patchset I was keeping the values to what have existed already. There was discussion WRT being more dynamic and whether that was the responsibility of the application or DPDK. http://mails.dpdk.org/archives/dev/2019-February/124457.html I'm open to this changing in the future, but for the moment was happy to see it stay as it is until a resolution is agreed upon. Ian > > [1] > (ETHER_HDR_LEN + ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE * 2) > >> + dev_info->min_mtu = ETHER_MIN_MTU; >> dev_info->rx_queue_offload_capa = 0; >> dev_info->rx_offload_capa = >> DEV_RX_OFFLOAD_VLAN_STRIP | >> >