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 D09A01E34 for ; Fri, 28 Apr 2017 14:38:08 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP; 28 Apr 2017 05:38:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,388,1488873600"; d="scan'208";a="81772810" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.252.172.161]) ([10.252.172.161]) by orsmga004.jf.intel.com with ESMTP; 28 Apr 2017 05:38:05 -0700 To: "Wu, Jingjing" , "Lu, Wenzhuo" , "dev@dpdk.org" References: <1493344523-58766-1-git-send-email-wenzhuo.lu@intel.com> <9BB6961774997848B5B42BEC655768F810D5A096@SHSMSX103.ccr.corp.intel.com> From: Ferruh Yigit Message-ID: Date: Fri, 28 Apr 2017 13:38:04 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: <9BB6961774997848B5B42BEC655768F810D5A096@SHSMSX103.ccr.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/i40e: consider QinQ when setting 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: Fri, 28 Apr 2017 12:38:09 -0000 On 4/28/2017 9:27 AM, Wu, Jingjing wrote: > > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit >> Sent: Friday, April 28, 2017 1:55 PM >> To: Lu, Wenzhuo ; dev@dpdk.org >> Subject: Re: [dpdk-dev] [PATCH] net/i40e: consider QinQ when setting MTU >> >> On 4/28/2017 2:55 AM, Wenzhuo Lu wrote: >>> When counting max packet length from MTU, count VLAN tag length twice >>> for QinQ packets. >>> >>> Signed-off-by: Wenzhuo Lu >>> --- >>> drivers/net/i40e/i40e_ethdev.c | 2 +- >>> drivers/net/i40e/i40e_ethdev_vf.c | 2 +- >>> 2 files changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/net/i40e/i40e_ethdev.c >>> b/drivers/net/i40e/i40e_ethdev.c index 3fa25dc..74041ae 100644 >>> --- a/drivers/net/i40e/i40e_ethdev.c >>> +++ b/drivers/net/i40e/i40e_ethdev.c >>> @@ -10593,7 +10593,7 @@ static void i40e_set_default_mac_addr(struct >> rte_eth_dev *dev, >>> struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data- >>> dev_private); >>> struct rte_eth_dev_data *dev_data = pf->dev_data; >>> uint32_t frame_size = mtu + ETHER_HDR_LEN >>> - + ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE; >>> + + ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE * 2; >> >> Hi Wenzhuo, >> >> Shouldn't we check if QinQ enabled before taking size account? > > Hi, Ferruh > > Checking QinQ enabled here makes no sense, because we don't know > If the packets is carry single vlan or double vlan. What do you think commenting code to say "I40E_VLAN_TAG_SIZE * 2" is for QinQ? It is not obvious and in the feature somebody not thinking about QinQ use case may miss this, and do something wrong, even can fix this J > > Acked-by: Jingjing Wu >