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 1E71DA0547; Fri, 29 Oct 2021 16:49:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 360DD426F0; Fri, 29 Oct 2021 16:49:27 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2051.outbound.protection.outlook.com [40.107.94.51]) by mails.dpdk.org (Postfix) with ESMTP id 975F5426DD for ; Fri, 29 Oct 2021 16:49:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M856uWRvs4b/SpLlmy/9syg9bl0wlx5OFbMa/7oQDgocSPTtGthEawGF4jwArky4b1Xq+FcssO3rPaoNlI2GeqAMOI/6irKE9vA+4SxsHDZ0i0l9qK1/sZg0JNTlAoVoRqeBQ6nP7NJv7ybCCtXOyKkgxEO0m5oCIVd9HFS0WLdi0EIWd9lCQ6bV0Cs8I9ceaxgnMiZdSmb6bZDKVCGw+0wZTp30JdRokVQKk9wFoMKI41DU7/oVLgu44xvZkP+00psp/En47emzQ1dhkdc3qdQomDiUmsSqPCyGf/mxH4ae4CDH5ZP8YVgG+Np3SD9l8auOjODDtlrUUyNF5Rp5Ig== 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=cTdU0+4P1HI3jXqDb1Q33+OfQ6Q+hWpUgUjvjBz9PLA=; b=cJHNgh0zDar5IyQH+wq0pcOVbMbP7WPL7Z5fz5PZaPEd3ku8as3hc7lQ2AfE1TTHQQAnolYypCdUgMaEizkIo/645KBwX+zO0hKxPVCZgesqA7//qI6nLum999huCfUpmkufccoCQLFMPilR3GLTpEMFv5Tvu21XCLp7oDRernhdfeRHbBlbDPxYN5itU4DIOcmTTZSBfGGm1WuvGqVCq2nohQCpc0UoaNZS0+G6abnb+9GFs/n8mUayeINk5mnlLmTm9Z1LA/9Fox9VfKBcrcTBWa3zIjq6UeLSu24Yg+uyfZr4AUvymFgmCwD8OhZ+3fEIoTPhtYJc7R01YihlHw== 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=cTdU0+4P1HI3jXqDb1Q33+OfQ6Q+hWpUgUjvjBz9PLA=; b=DMKBPtQbvHnPpKcS5WZdnV01ulJfGHh9U5nnOJazH8a8Bx7HYpGnZ8w+fOkAoVZaW/BC2xcJBvnXH9vlhQswd+kFfuzY8hgBR2u3lX2OTJBT8zRg5lhylYOJwrsH/ts2ioPUwT6Z4OyU3i9cbCbAIy41r7pMWwNHTFx3m3AnkW0= Received: from DM5PR2201CA0019.namprd22.prod.outlook.com (2603:10b6:4:14::29) by BYAPR02MB5064.namprd02.prod.outlook.com (2603:10b6:a03:71::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.15; Fri, 29 Oct 2021 14:49:21 +0000 Received: from DM3NAM02FT022.eop-nam02.prod.protection.outlook.com (2603:10b6:4:14:cafe::e1) by DM5PR2201CA0019.outlook.office365.com (2603:10b6:4:14::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.13 via Frontend Transport; Fri, 29 Oct 2021 14:49:21 +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 DM3NAM02FT022.mail.protection.outlook.com (10.13.5.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4649.14 via Frontend Transport; Fri, 29 Oct 2021 14:49:21 +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.14; Fri, 29 Oct 2021 07:48:46 -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; Fri, 29 Oct 2021 07:48:46 -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=36706 helo=xndengvm004108.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1mgTBV-0008YO-R4; Fri, 29 Oct 2021 07:48:46 -0700 From: Vijay Srivastava To: CC: , , , Vijay Kumar Srivastava Date: Fri, 29 Oct 2021 20:16:45 +0530 Message-ID: <20211029144645.30295-11-vsrivast@xilinx.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20211029144645.30295-1-vsrivast@xilinx.com> References: <20210706164418.32615-1-vsrivast@xilinx.com> <20211029144645.30295-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: 5b20ff8f-21fe-4e86-17bc-08d99aeb4b12 X-MS-TrafficTypeDiagnostic: BYAPR02MB5064: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:483; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4Obf+1tbpmDy7JpIH2jDsx65y3hSr0wozjTAFi5hHJ32tH7xUxpuNV8Wc9KQ1AO9O+28iFGSc9BDq7QRKimLgOkx8hD2iEx4TfUqSjr5KaI7orDb5Hu1r6d7ZKMkbGBGiEt48frHFihfJalCqabT5Xfk9ntIAq5gayYF1yXulWCBraIclGxrPOR3z6YVJ+sk3mjOr9JdJG4+f7Jk+5WOGYKseOYcjdkLbWJPIB+yYgDIptl9muFahfSQ1oQGeWvN+MFx9g4G710HA0u2xlIGzTgF4YaVq9lBqUslDHQR3WluuJmWKciLilffhliPZpXfmnw6KEcZmY9UaHgE6a2Z1qtNv4ByQQQZMa54WLSfUvgl/nwQzYh/BdVh0BUBb5GDXpJoeR1YY+HBiabgPNzAcN6B5dX/ZipFWfOb3EVu/hU4CeJc89gVFKKzpVfn9BT2CoX0aYglPPnM0MgScvgQyB5CZyfvu8nXIWrph7xmtCIrYjA0EqAMRM7nBs628ZkocCR1uoLeDDLUm4Ko3BQAEr5q3HXjI0MVyNfuNtS5jCiZyH7/QXkaj9iFiUgdrdRqcsEXmwwPymyv8yub+meWhMa7UC6+Vkp/JxKB84hfv8HJVWMM2hLygIo9Neor8Eyon4iKVgNs1u36+6LYvH2LtSS0pC1h2ObF6QeBUCQGvvUIZjJDN3DyeTM6sJ4PY86iGE7Maaaw/F3Me+mR+7nCOoP4VHQFSrUgMRRo07+Sl1o= 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:(36840700001)(46966006)(47076005)(8936002)(186003)(36906005)(54906003)(6916009)(44832011)(5660300002)(316002)(8676002)(83380400001)(36756003)(2906002)(4326008)(70586007)(70206006)(7696005)(9786002)(508600001)(7636003)(26005)(82310400003)(356005)(1076003)(336012)(107886003)(2616005)(36860700001)(426003)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2021 14:49:21.6195 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5b20ff8f-21fe-4e86-17bc-08d99aeb4b12 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: DM3NAM02FT022.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR02MB5064 Subject: [dpdk-dev] [PATCH v3 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 --- 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 dbd099f..bedc76c 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