From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D3E67A04B1; Thu, 5 Nov 2020 09:54:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ABED769A4; Thu, 5 Nov 2020 09:54:31 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by dpdk.org (Postfix) with ESMTP id BC8645AB3 for ; Thu, 5 Nov 2020 09:54:29 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 4FC287F59C; Thu, 5 Nov 2020 11:54:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 4FC287F59C DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1604566468; bh=67yMVMnL6H5POo7jPNIDSYuWnuxBMwu5dMMP6FiYV18=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=gkn5WBmY6TYM5uVkroqNFOUQr4J4ItVWGUhgvDYT+W+dluF1CTdss5W4l8ZtZ+kq0 GlSkTmFvHhEjCBlQ8GWu8xMT3KjmbWhcjmNQafYC497WC8FKOiS4pTxZHFMAfS9hho Y5wRisdHYEXdLyb9iXHS9KSD9qWB4X+VJr78cEow= To: Thomas Monjalon , SteveX Yang , Ferruh Yigit Cc: dev@dpdk.org, konstantin.ananyev@intel.com, beilei.xing@intel.com, wenzhuo.lu@intel.com, bernard.iremonger@intel.com, qiming.yang@intel.com, mdr@ashroe.eu, nhorman@tuxdriver.com, david.marchand@redhat.com References: <20201028030334.30300-1-stevex.yang@intel.com> <2034736.YrmxQ9UtPI@thomas> <8358021.KZzejQbnKC@thomas> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: <164a2edf-56d6-d34c-7575-d2a8789c8bd5@oktetlabs.ru> Date: Thu, 5 Nov 2020 11:54:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <8358021.KZzejQbnKC@thomas> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v8 1/2] app/testpmd: fix max rx packet length for VLAN packets 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" On 11/4/20 11:39 PM, Thomas Monjalon wrote: > 04/11/2020 21:19, Ferruh Yigit: >> On 11/4/2020 5:55 PM, Thomas Monjalon wrote: >>> 04/11/2020 18:07, Ferruh Yigit: >>>> On 11/4/2020 4:51 PM, Thomas Monjalon wrote: >>>>> 03/11/2020 14:29, Ferruh Yigit: >>>>>> On 11/2/2020 11:48 AM, Ferruh Yigit wrote: >>>>>>> On 11/2/2020 8:52 AM, SteveX Yang wrote: >>>>>>>> When the max rx packet length is smaller than the sum of mtu size and >>>>>>>> ether overhead size, it should be enlarged, otherwise the VLAN packets >>>>>>>> will be dropped. >>>>>>>> >>>>>>>> Fixes: 35b2d13fd6fd ("net: add rte prefix to ether defines") >>>>>>>> >>>>>>>> Signed-off-by: SteveX Yang >>>>>>> >>>>>>> Reviewed-by: Ferruh Yigit >>>>>> >>>>>> Applied to dpdk-next-net/main, thanks. >>>>>> >>>>>> only 1/2 applied since discussion is going on for 2/2. >>>>> >>>>> I'm not sure this testpmd change is good. >>>>> >>>>> Reminder: testpmd is for testing the PMDs. >>>>> Don't we want to see VLAN packets dropped in the case described above? >>>>> >>>> >>>> The patch set 'max_rx_pkt_len' in a way to make MTU 1500 for all PMDs, >>>> otherwise testpmd set hard-coded 'RTE_ETHER_MAX_LEN' value, which makes MTU >>>> between 1492-1500 depending on PMD. >>>> >>>> It is application responsibility to provide correct 'max_rx_pkt_len'. >>>> I guess the original intention was to set MTU as 1500 but was not correct for >>>> all PMDs and this patch is fixing it. >>>> >>>> The same problem in the ethdev, (assuming 'RTE_ETHER_MAX_LEN' will give MTU >>>> 1500), the other patch in the set is to fix it later. >>> >>> OK but the testpmd patch is just hiding the issue, isn't it? >>> >> >> I don't think so, issue was application (testpmd) setting the 'max_rx_pkt_len' >> wrong. >> >> What is hidden? > > I was looking for adding a helper in ethdev API. > But I think I can agree with your way of thinking. > The patch breaks running testpmd on Virtio-Net because the driver populates dev_info.max_rx_pktlen but keeps dev_info.max_mtu equal to UINT16_MAX as it was filled in by ethdev. As the result: Ethdev port_id=0 max_rx_pkt_len 11229 > max valid value 9728 Fail to configure port 0