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 7678EA0C53; Wed, 3 Nov 2021 15:02:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52C904275D; Wed, 3 Nov 2021 15:01:22 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2041.outbound.protection.outlook.com [40.107.95.41]) by mails.dpdk.org (Postfix) with ESMTP id ABBEA42756 for ; Wed, 3 Nov 2021 15:01:21 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XiqyAV6Ng2owNmqk0RMLuyCXsVyiaY+RoqeNn/Lu4+y8+iV1vce0mf1OUzWyt2YNPXDFUoyzizF1lN+Pwo3O9cbjuhm4rkDgAeqkjU4TWLPpnABQk9zqOm8vGL4VeHD8q187vA8/Bk/87qGEDbbPzrpIaKSpOyJmlkyM6kLr5Vn+FP0l3d3j99UBHbdX9oWCgfnm4/7zH0vOf1sOqHrI5XjZrh18Nvqgsjz5byV5NK8kfwvlGP9J8Qez0ACWoZi43aY5HCQ+GXimchyt444OEUXj7Y38zgfEF/SZDA3NoObaf4WjE+ImJ6oDfiI+l/WrZV07o+bm7FCVvXiyT8dh7A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FDqmHez17t6BGlZl0B1rgyzIIol0MeRdLhaMtox4doI=; b=ahRrx7ob4EkwqnE8G08x89dwxB7VRFD2imvXwPZjfNd/LbQHmuhhyow5kCmJWIc86Nm5V7aamSVtAVrQc6HWP3TRG8cDavJAoCRMQZvhuGJ5wNuYuaiR3SJzWAr3s2EolTstg35MAvAmHGHCMgAJ0qD1hrURyiu+Fp5gkfvgFOoxsz4Rtw2X+KIX+5skqii1KwoptD8kCrQQ0ubai3UBnBmhdukjsSRkzNvJHySNcxRnQ/fFsoL7a8mF+kGJhFhDdeXOBz+ETl14KMZudRFavlbJkg1Q/39YfsW3c+1zQZtjhzMXTfeEIAKW6VTaftZQzUdkPhI00OkFBwpwuDdhBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=dpdk.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FDqmHez17t6BGlZl0B1rgyzIIol0MeRdLhaMtox4doI=; b=bvdA/fE+ECr1BEzPltwHbFVogTWK4eVGAC73nsz+GG+kchYCcTOy8G5RyI3EiXWd4DYAOBYEB+ej+iut095+qKKTO3w1JbO5zvcDXNw0SVUhVkJj9YvNzKJunHeKo1dRlQM8NgznQl1ZBfQPzWviOJLQOqlMpgFSMC8xVEtuUUo= Received: from SA0PR11CA0163.namprd11.prod.outlook.com (2603:10b6:806:1bb::18) by DM6PR02MB6587.namprd02.prod.outlook.com (2603:10b6:5:220::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Wed, 3 Nov 2021 14:01:19 +0000 Received: from SN1NAM02FT0029.eop-nam02.prod.protection.outlook.com (2603:10b6:806:1bb:cafe::11) by SA0PR11CA0163.outlook.office365.com (2603:10b6:806:1bb::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15 via Frontend Transport; Wed, 3 Nov 2021 14:01:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0029.mail.protection.outlook.com (10.97.4.175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4669.10 via Frontend Transport; Wed, 3 Nov 2021 14:01:19 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Wed, 3 Nov 2021 07:00:55 -0700 Received: from smtp.xilinx.com (172.19.127.96) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Wed, 3 Nov 2021 07:00:55 -0700 Envelope-to: dev@dpdk.org, maxime.coquelin@redhat.com, chenbo.xia@intel.com, andrew.rybchenko@oktetlabs.ru Received: from [10.170.66.108] (port=38886 helo=xndengvm004108.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1miGox-0003SS-BX; Wed, 03 Nov 2021 07:00:55 -0700 From: Vijay Srivastava To: CC: , , , Vijay Kumar Srivastava Date: Wed, 3 Nov 2021 19:27:54 +0530 Message-ID: <20211103135754.17411-11-vsrivast@xilinx.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20211103135754.17411-1-vsrivast@xilinx.com> References: <20210706164418.32615-1-vsrivast@xilinx.com> <20211103135754.17411-1-vsrivast@xilinx.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8d57f3c7-32be-4fda-2df4-08d99ed2694f X-MS-TrafficTypeDiagnostic: DM6PR02MB6587: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:101; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L3AP+RTa4eskTzioN6CeGJ5BUHROPbLJ/4PDp69emItdIdZqODaHCkJo+zI1GOUWsbtapXF0Ye1fpUivAbJSetFeuvDY7mLDbuaWZk+9M8nSfs7QhGs9cQaZs8m8JAd/ZxEukH6iNMw9MeoWiaqvuH6pF46FPPQ9726clG4qfD6neZxK7NGxtxz6B8q1gS/ldATyVNcjHUZ1Z+vT8Bd0vAi0Gc8VVhXr2g/nw+BHlP5mNGe9s6zqtu1Ju0L3q8/xxwUe2a6YPJ4+WHU6J+eFMXYYF0LFW0Mh6uxy5GoxRKuz60iqAY0rWjp9Y8FFkvbzSkoENtd1vExD6++u9pbgaOr+SsCp53Oi2/c18DQ6/e8ubSoEfYSm0CV/LpcxNH3J+dGmpVjIhUKavuSdMUPNtmuefk4nFEp280U5e14mmVU5jhnr/AeppF+O1h4lINa1pvVUZ+ZV9xdsUdXIkjy1FvhIeR9mGNtCGhiACHaUbDk3TYGvKa+onP+7rRfj92CpXg3HOB3RDS5LWZX5RtaIeOqjwr4PFr/JjYftLkys3PtG/M8f3uD0kFix/0f9p9wviQOwmsdatp55jFnzDsgiLX7p8k+7WgTCXzct1xLH4TLSIPIBuf2BiSINr1hYd+fBIlODIJJ7XqJGuigOKWO6EsL+bq5NDbm8otg6QczK9eE+B8l6YDp1dAT++33SFs0TGc5W1GnasPxJ/dZh60pbYgtxLQVWDBelZZF82amyGJc= X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch02.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(36840700001)(46966006)(426003)(47076005)(82310400003)(54906003)(316002)(36860700001)(2906002)(36906005)(336012)(5660300002)(1076003)(8676002)(9786002)(6916009)(107886003)(4326008)(83380400001)(7636003)(2616005)(70206006)(356005)(44832011)(70586007)(36756003)(8936002)(7696005)(186003)(26005)(508600001)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2021 14:01:19.5963 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8d57f3c7-32be-4fda-2df4-08d99ed2694f X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0029.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB6587 Subject: [dpdk-dev] [PATCH v4 10/10] vdpa/sfc: set a multicast filter during vDPA init 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" From: Vijay Kumar Srivastava Insert unknown multicast filter to allow IPv6 neighbor discovery Signed-off-by: Vijay Kumar Srivastava Acked-by: Andrew Rybchenko Reviewed-by: Chenbo Xia --- v4: * Improved line usage by rearranging function params. drivers/vdpa/sfc/sfc_vdpa.h | 3 ++- drivers/vdpa/sfc/sfc_vdpa_filter.c | 20 +++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/drivers/vdpa/sfc/sfc_vdpa.h b/drivers/vdpa/sfc/sfc_vdpa.h index 81fc39d..080f2d6 100644 --- a/drivers/vdpa/sfc/sfc_vdpa.h +++ b/drivers/vdpa/sfc/sfc_vdpa.h @@ -21,7 +21,7 @@ #define SFC_VDPA_DEFAULT_MCDI_IOVA 0x200000000000 /* Broadcast & Unicast MAC filters are supported */ -#define SFC_MAX_SUPPORTED_FILTERS 2 +#define SFC_MAX_SUPPORTED_FILTERS 3 /* * Get function-local index of the associated VI from the @@ -32,6 +32,7 @@ enum sfc_vdpa_filter_type { SFC_VDPA_BCAST_MAC_FILTER = 0, SFC_VDPA_UCAST_MAC_FILTER = 1, + SFC_VDPA_MCAST_DST_FILTER = 2, SFC_VDPA_FILTER_NTYPE }; diff --git a/drivers/vdpa/sfc/sfc_vdpa_filter.c b/drivers/vdpa/sfc/sfc_vdpa_filter.c index 9687278..4c133aa 100644 --- a/drivers/vdpa/sfc/sfc_vdpa_filter.c +++ b/drivers/vdpa/sfc/sfc_vdpa_filter.c @@ -39,8 +39,12 @@ spec->efs_flags = EFX_FILTER_FLAG_RX; spec->efs_dmaq_id = qid; - rc = efx_filter_spec_set_eth_local(spec, EFX_FILTER_SPEC_VID_UNSPEC, - eth_addr); + if (eth_addr == NULL) + rc = efx_filter_spec_set_mc_def(spec); + else + rc = efx_filter_spec_set_eth_local(spec, + EFX_FILTER_SPEC_VID_UNSPEC, + eth_addr); if (rc != 0) return rc; @@ -103,8 +107,18 @@ int sfc_vdpa_filter_config(struct sfc_vdpa_ops_data *ops_data) rc = sfc_vdpa_set_mac_filter(nic, spec, qid, ucast_eth_addr.addr_bytes); if (rc != 0) + sfc_vdpa_err(sva, "unicast MAC filter insertion failed: %s", + rte_strerror(rc)); + else + sva->filters.filter_cnt++; + + sfc_vdpa_log_init(sva, "insert unknown mcast filter"); + spec = &sva->filters.spec[SFC_VDPA_MCAST_DST_FILTER]; + + rc = sfc_vdpa_set_mac_filter(nic, spec, qid, NULL); + if (rc != 0) sfc_vdpa_err(sva, - "unicast MAC filter insertion failed: %s", + "mcast filter insertion failed: %s", rte_strerror(rc)); else sva->filters.filter_cnt++; -- 1.8.3.1