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 4D18BA04A4; Wed, 3 Jun 2020 16:52:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 854881D447; Wed, 3 Jun 2020 16:52:39 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 4B0181C1A3; Wed, 3 Jun 2020 16:52:38 +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 053Eobhf016640; Wed, 3 Jun 2020 07:52:37 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : content-type : mime-version; s=pfpt0818; bh=Og0pulZ8g3lemelLYpQxb+qFmJpj6K7QnMqZqkVFD/U=; b=q14qVYUnlHau/zWlfWQUmnJqB9jINPUHht1VUcApdennckqNo6devph0zzAbwCeztSfy 8dNf/auLxP7aNqdYZLP+iyEkDQDGUF/eS7x3FM1CCnhSsWLOJlz2FZd70XL5nQitMcDL 5rMiAeSfkBsN/9UP8SZr8dcPJzRHr4RDveV0kLrvnhZrVPgfvCcD+ZSDap4BtUs1cj+h 1NBfsN8uX4ZyRN5v6I+Bqs3dU7Nd5p4DI+b0N9MqdxzmYteC1wrV+bzAP93/crM34D2U 2PxGyaHCM00NtExMpncrh3960vArOOFQS9qhwK191AGZ/F6P0EhKk/C9GbGSDh9vGfJK QA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 31bq0myhn6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 03 Jun 2020 07:52:37 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 3 Jun 2020 07:52:35 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (104.47.37.50) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 3 Jun 2020 07:52:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CI95aFvxqfrh+klJCvh/bzQmhHOhOyeyMM+HX5C7j9dmKyXt4708LyOwTWegZyqyrOTi25FPhpI3uUrEevj0vU5Ybab5/DroPBskOOrsAfJsr6E9IS5ddwlxXcTFgG+VLsu+RVpPg6UpVFcxQ/9vY67428lV3yS6pvdCDBRlzG0BzKwrzsyS3HAPuvEvxbw2VIRa57+P9WHBHnRWdPK8HW+SyaI/qAL6952ODRb4QYI+bIPg+NZwI/vcERaf+MhCvamcshkHITaFsz+ccW0U/t1QDBet1/E37N33AykKHlPxhO4SN17q8ssvlJKYP4mfq1Tw39q8p0LEXeYxcoKxNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Og0pulZ8g3lemelLYpQxb+qFmJpj6K7QnMqZqkVFD/U=; b=QEa+SQqcM2oaaD/YPaWOcrUQ8vxgbqRrnwNMs5NRrZvZkvM0i0d6yuipj18O8Pdp8vTqQkc9cCcIu7lylRam6F0vS1yRVHZzvgH1lSoGYCZhnqfJ/yJU5viygVBK/l0vkvC42pWA02bxWrxUc6Kta/sEbQkcEnHitryGM4gUX7BpJYRl6xIZ3f4DznR6wZFtjQMRKDbSSRzAUkhkSJsI3AY4VQDlXu14WqOeNF+RHRcW2Z8hiaVFTN20mG8eSwhONFMHpL8n32EUsSQV3F7bmrqoBXLp7DrHBBk1uD/i1X8Fed+NMc7K7zyg4yjJRNVGtuOrX8z713iehsYyF+vfKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Og0pulZ8g3lemelLYpQxb+qFmJpj6K7QnMqZqkVFD/U=; b=c0AOeSQ8n9xPJys56ChKnbjs4+bnWI6kvIkc4GQ0JzlcZP1oCQ5cdx+JlZNZxeFsDaclG4C7UzibRV9lU/GLDAtKbZ/duKCCL/95ShZP89qxVNd9zdh9EDyYlyzmGTK/izNjo6jZ8WuJvY2P7AJ9F2u9TXxOzCOrrbdmMIZn2+Y= Received: from MN2PR18MB2848.namprd18.prod.outlook.com (2603:10b6:208:38::19) by MN2PR18MB2688.namprd18.prod.outlook.com (2603:10b6:208:105::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Wed, 3 Jun 2020 14:52:34 +0000 Received: from MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::f4fb:5e32:18dc:fb93]) by MN2PR18MB2848.namprd18.prod.outlook.com ([fe80::f4fb:5e32:18dc:fb93%7]) with mapi id 15.20.3045.024; Wed, 3 Jun 2020 14:52:33 +0000 From: Harman Kalra To: Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K CC: , Harman Kalra , Date: Wed, 3 Jun 2020 20:22:13 +0530 Message-ID: <1591195933-16362-1-git-send-email-hkalra@marvell.com> X-Mailer: git-send-email 2.7.4 Content-Type: text/plain X-ClientProxiedBy: PN1PR0101CA0014.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:e::24) To MN2PR18MB2848.namprd18.prod.outlook.com (2603:10b6:208:38::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from hkarlara-OptiPlex-3046.marvell.com (115.113.156.2) by PN1PR0101CA0014.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3066.18 via Frontend Transport; Wed, 3 Jun 2020 14:52:31 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 98fffb90-bec9-4d98-f3f0-08d807cdbf85 X-MS-TrafficTypeDiagnostic: MN2PR18MB2688: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:568; X-Forefront-PRVS: 04238CD941 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i5hixv/XsCuTPc3UmitvWpn976bKwXLo1yeq3fw1G5E73xlkl1v13JV6lU2lenUYtKE+ARqXkzJeDiNF12uwg5gu55wzNDb4A8PYI3mOpQS0BcLs1T/pXNAVz8GbSKWWEZUqWmICcP87hLzO0duTAagorB8CEcU9g0eZ1KwRPhZBzSZdGIBx1RCaVu2XrXN29RaJEk3Buf1/owORPavccJ4SeEf6K7CSY7QN7VLXSvwGiJcfJBkm2lswEU77Buusoz7vMunmVWqECk2uJN96eViCc69YPDWrhCZjG2d/51d+lDvgZr9KzP41h2D86JQlrrNsGQmPcrhDk24r1EWrdw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR18MB2848.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(366004)(376002)(346002)(396003)(136003)(186003)(450100002)(26005)(4326008)(52116002)(6486002)(16526019)(55236004)(110136005)(66946007)(66476007)(7696005)(6636002)(316002)(66556008)(2906002)(2616005)(5660300002)(6666004)(478600001)(956004)(83380400001)(8676002)(36756003)(8936002)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: xgH7LriS1oUC1PqYFFPP6V+aAxU4okM5KhKKCBui7mJq7FpUm3LHlsA48aHcJj0l//xZIPJVexkiPLsqYIkf/TgMxfZX757TiDYOriHFB8DerHIYwiVHsDnKEQo1lleWUetL/V+H9keWW2dk8TuaIJwbDqqUS20giZwde15FYampmbBZ9x8mV06Apjb6IHiPupEjKGZ4DsYaAPXSfsjjcZcDxbKtkJqiL3+8ukOXAiZqoRMW26rARsA+DGKr1TVf/+zJuwNWAEUVj2n1ps5mK0bx+9dtdHAAqQ86/hqfAjlgwqvb0FP7HzqG/iX2vOyCZm9gIklLh7P9NAkbT+mJOqeMAWZ4pQOvrgch14Pu6F9yNvsk5HpqZGD5OfcjvNnBxWFygQJF21eDcQBFGtCkX4kBkZlQo+4eBfQbGoYZWVC/wOWWOnfuHe1rREiHSJMJkxV4Av6ySguCjwzeBrIOWCf8xeCssq+Y2hCuE5NJ8Yg= X-MS-Exchange-CrossTenant-Network-Message-Id: 98fffb90-bec9-4d98-f3f0-08d807cdbf85 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2020 14:52:33.8830 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qn4RR3xbdCP8NFqyB4K7lG4z1L1I0b70lfqjUz5XZJdcs/fvDnIsKCOaCtxBqRfueB1aXlw9xnT8U6YUR7rIFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2688 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-03_13:2020-06-02, 2020-06-03 signatures=0 Subject: [dpdk-dev] [PATCH] net/octeontx2: fix dmac filtering 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" Issue has been observed where packets are getting dropped at DMAC filtering if a new dmac address is added before starting of port. Fixes: c43adf61682f ("net/octeontx2: add unicast MAC filter") Cc: stable@dpdk.org Signed-off-by: Harman Kalra --- drivers/net/octeontx2/otx2_ethdev.h | 1 + drivers/net/octeontx2/otx2_ethdev_ops.c | 4 +++- drivers/net/octeontx2/otx2_mac.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h index 0fbf68b8e..16b0d8163 100644 --- a/drivers/net/octeontx2/otx2_ethdev.h +++ b/drivers/net/octeontx2/otx2_ethdev.h @@ -271,6 +271,7 @@ struct otx2_eth_dev { uint8_t mac_addr[RTE_ETHER_ADDR_LEN]; uint8_t mkex_pfl_name[MKEX_NAME_LEN]; uint8_t max_mac_entries; + bool dmac_filter_enable; uint8_t lf_tx_stats; uint8_t lf_rx_stats; uint16_t flags; diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c index 80ac2b96e..faecf216c 100644 --- a/drivers/net/octeontx2/otx2_ethdev_ops.c +++ b/drivers/net/octeontx2/otx2_ethdev_ops.c @@ -148,8 +148,10 @@ otx2_nix_promisc_enable(struct rte_eth_dev *eth_dev) int otx2_nix_promisc_disable(struct rte_eth_dev *eth_dev) { - otx2_nix_promisc_config(eth_dev, 0); + struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev); + otx2_nix_promisc_config(eth_dev, dev->dmac_filter_enable); nix_cgx_promisc_config(eth_dev, 0); + dev->dmac_filter_enable = false; return 0; } diff --git a/drivers/net/octeontx2/otx2_mac.c b/drivers/net/octeontx2/otx2_mac.c index 262d185e5..49a700ca1 100644 --- a/drivers/net/octeontx2/otx2_mac.c +++ b/drivers/net/octeontx2/otx2_mac.c @@ -76,6 +76,8 @@ otx2_nix_mac_addr_add(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr, /* Enable promiscuous mode at NIX level */ otx2_nix_promisc_config(eth_dev, 1); + dev->dmac_filter_enable = true; + eth_dev->data->promiscuous = 0; done: return rc; -- 2.18.0