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 33790A0C4A; Wed, 7 Jul 2021 10:26:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96EE9414B3; Wed, 7 Jul 2021 10:25:42 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2078.outbound.protection.outlook.com [40.107.223.78]) by mails.dpdk.org (Postfix) with ESMTP id D5DEB4120E for ; Tue, 6 Jul 2021 18:50:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m7gu5MUwZQ19QD13rL6fxlK78goNygsL5wSa7meSUZfv8ag5RS7qRFJU3jxL2EK02HCusLqJpE7l0+L2nb0EWZnDjQCmu9oTlSvkESYKvYexPDTdqgObS4eR5TIntf0U8C3wnkXwF93XC+b558861kOkdjD4FZIfi8y85+pZZGrHN6k5j9Q5dsI0pnRxbwx0z0XMry4GHR2oapphOAIGdPPhzhjLmiQ5tCNzON5lEHkJMwzWlkC0No0z4SH5ZIY3VpGYXfMdIFZ+6K+zdbBuJlBpdEBcdOo8rDsnpKcbou5J1xH0k8Z67QCOGvh4bMnyaYFSzA+rJLqrVpViUKmpfQ== 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=IU/6YBURm/UBK3CemawA/giohGtuRcaZ3VOxepZ4UZU=; b=dYGXdgP62E4ALMlfa9IXNlDH6b5nl5AtSP29AoJWClE7MA5IfY07HoPKksMSZTuOHGlAYlFKYgFfYJso4RSgo2gwaPKFtSWcKg972iYDLTR7ksuqZsFZFc41fN8SAZkXJDkGyFPicgKUPsl8f1loIQIS5lWsfpfjvUsv6vtoY6LM526cFM3y1DtHzz6KgK9lEl9TZr2huMRItpZUeUKZyV5S4rY2tSoE3DWZbIhmj/RlJa6bpAe39fO33OZs6o5MyjG3/AHYj6j7dxrdY4CdSz0vATxjU1WNGCT7BY43SJNUSVTZfxdVn3DN9+n2BXD0GlWD5eXWDHRbKu1N+L2nSA== 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=IU/6YBURm/UBK3CemawA/giohGtuRcaZ3VOxepZ4UZU=; b=PvrKJ0AFP7B0HvVaCRdS5RNQPxVrS5CB8oeElxydrU6DAXuBQeRB9Ii2OkTCXh3tXgBtD8XbGhyR4oTufVEx3esAAU8ln6UE/iAB7xUSze90WFn4pcGQ/3QJn9nMsY4Ubxmmf4i0MFfbJCaqyahzrsEtat+DBC1qmFsT2m7pyV8= Received: from BN9P221CA0002.NAMP221.PROD.OUTLOOK.COM (2603:10b6:408:10a::9) by MN2PR02MB6301.namprd02.prod.outlook.com (2603:10b6:208:1bc::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22; Tue, 6 Jul 2021 16:50:41 +0000 Received: from BN1NAM02FT047.eop-nam02.prod.protection.outlook.com (2603:10b6:408:10a:cafe::97) by BN9P221CA0002.outlook.office365.com (2603:10b6:408:10a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.19 via Frontend Transport; Tue, 6 Jul 2021 16:50:41 +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-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by BN1NAM02FT047.mail.protection.outlook.com (10.13.3.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4287.22 via Frontend Transport; Tue, 6 Jul 2021 16:50:40 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 6 Jul 2021 09:50:23 -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.2 via Frontend Transport; Tue, 6 Jul 2021 09:50:23 -0700 Envelope-to: dev@dpdk.org, maxime.coquelin@redhat.com, chenbo.xia@intel.com, andrew.rybchenko@oktetlabs.ru Received: from [10.177.4.108] (port=54950 helo=xndengvm004108.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1m0oH9-0000pF-DG; Tue, 06 Jul 2021 09:50:23 -0700 From: Vijay Srivastava To: CC: , , , Vijay Kumar Srivastava Date: Tue, 6 Jul 2021 22:14:18 +0530 Message-ID: <20210706164418.32615-11-vsrivast@xilinx.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20210706164418.32615-1-vsrivast@xilinx.com> References: <20210706164418.32615-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: e1ddf1d8-9727-4bd7-b70d-08d9409e3070 X-MS-TrafficTypeDiagnostic: MN2PR02MB6301: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:483; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q+Sgs6tmE+cNYU8w25kJqHJat0CWcfKEU4rfPDezE5Gkr9jhNewyb4kKpSIeSRB82S1Cyq2o85C8qdBu69bzH4Sd2ZvxYgJpwj9hN9tEvNM9vaUfbCG1LBmVh+u0yzTJz7uqYnr/04S3Q4TFlpE2hfhwB6qX39XREw39LpPfVB+cXLWJUeqXf+dns7uvqe552keuY6Z66+fQ0zPepN1o8LQ6J9YzeFU5CX1NBBnGav6KcoY8Umxj+tBOKgas8qyBemsnEKAmMH37V8LxmK2bXQGQ3f9WbPwmFpbklkko6xAff3rQiwXyE+xdJxj4sC1SzKgBiJ43Rcgr1qy4TLkC5XIcbnT60X8TIKqrOqkPoanK9HZhRbIkdK2u7nE/q3L3aUe056lRQzUHyWxVjacjMyLvcI+MTbeIflXW8NolOoMM/3mokOqlDjdRZE4w8QnL69GV3QkDHmGfxOqvWjIMcGfLlR307GEL/bc9Cy/6t+FvgjvDsb1k9K2PHiN5Xf27aKJLv5S4Ww0WnOYNHh3Zf+YwubFoi0o6EHBi2Hl8Y80SkYmsnKMjOPWBuT365FHHFKYwbecBnBkZtu+R5kVzMa/zdhpjLyiaZvnYwZJGcvhfdBiMrGInhrn8M3Jnzi43oxLQiR1fAGsM3tgbwwkO6nmAy7UXcRNG2gL6hq96vpBuM+pvgfV6IF5tGs9GmIkH6kuxyNbRlgVgYFHy2W4QDYmG+4WrQmx5AH5Q/qDQYOY= X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch01.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(136003)(396003)(46966006)(36840700001)(82740400003)(478600001)(426003)(47076005)(70586007)(9786002)(356005)(36756003)(83380400001)(36860700001)(82310400003)(316002)(7636003)(2906002)(8936002)(107886003)(44832011)(4326008)(336012)(6666004)(26005)(8676002)(7696005)(6916009)(36906005)(5660300002)(70206006)(2616005)(186003)(1076003)(54906003)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2021 16:50:40.9920 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1ddf1d8-9727-4bd7-b70d-08d9409e3070 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-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT047.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB6301 X-Mailman-Approved-At: Wed, 07 Jul 2021 10:25:28 +0200 Subject: [dpdk-dev] [PATCH 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 --- drivers/vdpa/sfc/sfc_vdpa.h | 3 ++- drivers/vdpa/sfc/sfc_vdpa_filter.c | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/vdpa/sfc/sfc_vdpa.h b/drivers/vdpa/sfc/sfc_vdpa.h index fd480ca..68bf79a 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 03b6a5d..74204d3 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; @@ -114,6 +118,17 @@ int sfc_vdpa_filter_config(struct sfc_vdpa_ops_data *ops_data) 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, + "mcast filter insertion failed: %s", + rte_strerror(rc)); + else + sva->filters.filter_cnt++; + sfc_vdpa_log_init(sva, "done"); return rc; -- 1.8.3.1