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 A1DCAA0350; Mon, 11 May 2020 08:22:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B50B1C436; Mon, 11 May 2020 08:22:08 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 94B1B1C2AA for ; Mon, 11 May 2020 08:22:06 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04B6BobC004169 for ; Sun, 10 May 2020 23:22:05 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=RoExTrF5+puqxh4tp0mmjBvekfLDNNHNEzKOSym90r4=; b=EDLXPjw3yv55j3OvfiZJngdOpkAzQ1yBFZLv5Bqonp49GmPd1TqD3Dl6AciIarTSQ31C +2w+EHx264eS3TWPgzQK7BLBS4RpjgmxdoLgbuM7GfzsJK211/AHgmGBHxtNCWDgLh0R 2n+wmgnIAYpM5lzm5x3VOnKa37y0xn/aCP/2ITlO4vTayT8B7/0FXyTB87lnO2bpWYDG VRczw88lCZR3s86pduORqD0VR20qOLjJ0xgdeaEwmIu/+LoEPsIbjd5p0ZfH3esDWogZ zb5TNHyxGMfnOrFhFNs7F2a5tfDIsFhu72Y3JRZePscTy9JTWEXHDjR6OxgOuam/QVt8 ng== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 30wv1n5a8a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sun, 10 May 2020 23:22:05 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 10 May 2020 23:22:03 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 10 May 2020 23:22:02 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sun, 10 May 2020 23:22:02 -0700 Received: from localhost.localdomain (unknown [10.28.34.200]) by maili.marvell.com (Postfix) with ESMTP id 759243F703F; Sun, 10 May 2020 23:22:00 -0700 (PDT) From: Sunil Kumar Kori To: Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K CC: , Sunil Kumar Kori Date: Mon, 11 May 2020 11:51:56 +0530 Message-ID: <20200511062156.15534-1-skori@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-11_01:2020-05-08, 2020-05-11 signatures=0 Subject: [dpdk-dev] [PATCH] net/octeontx2: fix minimum length to SMQ config 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" NIX exposes NIX_AF_SMQ(0..511)_CFG to configure minimum length of the packet which is being used for zero padding if packet is less than configured value. Setting it to default minimum length i.e. 60 bytes. Fixes: ec8ddd4fb1be ("net/octeontx2: restructure TM helper functions") Signed-off-by: Sunil Kumar Kori --- drivers/net/octeontx2/otx2_tm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/octeontx2/otx2_tm.c b/drivers/net/octeontx2/otx2_tm.c index b57e10f74..8ed059549 100644 --- a/drivers/net/octeontx2/otx2_tm.c +++ b/drivers/net/octeontx2/otx2_tm.c @@ -555,10 +555,13 @@ populate_tm_reg(struct otx2_eth_dev *dev, switch (hw_lvl) { case NIX_TXSCH_LVL_SMQ: - /* Set xoff which will be cleared later */ + /* Set xoff which will be cleared later and minimum length + * which will be used for zero padding if packet length is + * smaller + */ reg[k] = NIX_AF_SMQX_CFG(schq); - regval[k] = BIT_ULL(50); - regval_mask[k] = ~BIT_ULL(50); + regval[k] = BIT_ULL(50) | NIX_MIN_HW_FRS; + regval_mask[k] = ~(BIT_ULL(50) | 0x7f); k++; /* Parent and schedule conf */ -- 2.17.1