From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D5145A0547; Tue, 26 Oct 2021 17:45:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C094B40E0F; Tue, 26 Oct 2021 17:45:57 +0200 (CEST) Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by mails.dpdk.org (Postfix) with ESMTP id 9A922407FF for ; Tue, 26 Oct 2021 17:45:56 +0200 (CEST) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19QDk9bF035894; Tue, 26 Oct 2021 15:45:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=eJnk/Vd4JouIQVMprCCpgsvqAJUtHxWbx0d6GKYfpeE=; b=XGJAvsseKxKQ9icDuOCXpW6PUhscZ8Pc/RPPSdugMdSzeVArKVt3a7ptrKX2ZsFrMQT7 FRFtXzr/j8XFMHq8norFFhhbctiVn4IzSH37rGTsbYSsxRbWrJAft0pRwokn1sujNhax 2XgIOdu2M7h+4umXoPOaW/r7Hnl15nOx1hJGeYDysCH/bAxZohDp19jzGtZ/owrpoNOk ttlcFNeZ6LJua3xy/3/x7O2g42MVINKrl9SZyr8p0mwouVcCpQdoeIJNXj1ZI4AAtd/G 1Bn9NQ6KWlUZS1laRblmKFc+zk3S6OzTunoRZggRriGr+tnsRunKTGBceG7y8pQnwspC Qg== Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bx4kbcjy3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 15:45:54 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19QFcqNi025586; Tue, 26 Oct 2021 15:45:53 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma03wdc.us.ibm.com with ESMTP id 3bx4eyyb00-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Oct 2021 15:45:53 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19QFjqs144237198 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Oct 2021 15:45:52 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8D254AC065; Tue, 26 Oct 2021 15:45:52 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A85CDAC060; Tue, 26 Oct 2021 15:45:51 +0000 (GMT) Received: from [9.211.81.124] (unknown [9.211.81.124]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 26 Oct 2021 15:45:51 +0000 (GMT) Message-ID: <2fac55d9-82d9-3a8a-0b6e-1fc3d2985de3@linux.vnet.ibm.com> Date: Tue, 26 Oct 2021 08:45:50 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Content-Language: en-US To: Ferruh Yigit , Jakub Grajciar , Somnath Kotur , Rosen Xu , Andrew Rybchenko , Ajit Khaparde Cc: dev@dpdk.org References: <20211026153802.1820636-1-ferruh.yigit@intel.com> <20211026153802.1820636-2-ferruh.yigit@intel.com> From: David Christensen In-Reply-To: <20211026153802.1820636-2-ferruh.yigit@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: gBRJMZzMAyV3D96uxu5gANsw4rhvFGAt X-Proofpoint-GUID: gBRJMZzMAyV3D96uxu5gANsw4rhvFGAt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-26_04,2021-10-26_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 mlxscore=0 clxscore=1011 suspectscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2110260087 Subject: Re: [dpdk-dev] [PATCH 2/2] net/memif: fix driver init with default MTU X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 10/26/21 8:38 AM, Ferruh Yigit wrote: > Driver is using 'ETH_FRAME_LEN' Linux defined value as max frame length, > which doesn't include FCS (4 bytes CRC). But ethdev by default uses > frame size with FCS when application doesn't define any explicit value. > > As a result device configuration fails because device is tried to be > configured with a frame size length that is bigger than what device > reported as supported. Device reports as max supported frame size is > 1514 but configured value is 1518. > > Instead use DPDK macro, 'RTE_ETHER_MAX_LEN', that includes FCS in the > driver to report the max supported frame size, this matches to the > initial intention. > > Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length") > > Signed-off-by: Ferruh Yigit > Reported-by: Andrew Rybchenko > --- > drivers/net/memif/rte_eth_memif.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c > index 8cec493ffdb9..cbc99067c1c8 100644 > --- a/drivers/net/memif/rte_eth_memif.c > +++ b/drivers/net/memif/rte_eth_memif.c > @@ -195,7 +195,7 @@ static int > memif_dev_info(struct rte_eth_dev *dev __rte_unused, struct rte_eth_dev_info *dev_info) > { > dev_info->max_mac_addrs = 1; > - dev_info->max_rx_pktlen = (uint32_t)ETH_FRAME_LEN; > + dev_info->max_rx_pktlen = (uint32_t)RTE_ETHER_MAX_LEN; > dev_info->max_rx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS; > dev_info->max_tx_queues = ETH_MEMIF_MAX_NUM_Q_PAIRS; > dev_info->min_rx_bufsize = 0; > Tested-by: David Christensen