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 AB419A0C45; Thu, 28 Oct 2021 09:57:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 888D241123; Thu, 28 Oct 2021 09:57:14 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2054.outbound.protection.outlook.com [40.107.94.54]) by mails.dpdk.org (Postfix) with ESMTP id 0316841123 for ; Thu, 28 Oct 2021 09:57:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PcM1Uqi1U8uvMufZDgvdMFIp5uD7HFAxNAXavsWBNPTvjyJg3ZkHNQazW/MtWl6/5zv//cyiT42TCcN/98jtbSr/Pa6KHAJtCTd89yNvQC6nw/JHBhFzC1L1s+7YrvpOW4dZNQWisVL+iV9Sy4W0DIPJ6wCPe4iqY+9CGqQKLJP9xjqztguSFNK3U+qGENH5Ix83Z5NskKp/9sl9NLxvEj399Mq3szA9MJcDUtetfTM0nJ6JwArI6AGJ22jtwi8Z8jBytgvtpMxI9S0D6m8ISLAlEbH/aLiGsleWpuW1l+R6DKaky/vuBK691wwCQ2uuGTnear8sFFvaSaz3p22Vrw== 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=LYWiExb4ZlzC1+L5lT11ofna7Z89d1yzG9n9EiBZiHo=; b=MazjD12BsCaMaKpB/v5XSLyIjx+FXRpSANL0vmMH0lZb3A+Qlyw4BOL19dv3IbsfcDgqlAk7qJIs44vHinFfhHyp3+ZTEU62UfjEGhHjIDoBp0O7GFMSTZz9pE/TNdcLNwpKZsByMQx8KUTO4JonT7JCJyMo4pZBu757XbeBBoEJo7XUjUTivbvJu1R4RfsDHt23otZmWLAP77e9QKNoqiT4O9aJR6oNaqPjbYHJ8VGtwwL0SQ55qEKGn7JXzgl+yDSFty52P0G/Oq0+4w/Qtx6w7TgW9V1uuB7cl81xSFyEJagksnbE7P8bjnOnMtJecZR5F5VjoVPnMgJhQlN0eA== 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=LYWiExb4ZlzC1+L5lT11ofna7Z89d1yzG9n9EiBZiHo=; b=EJcw1TsZ1NlB02+FyW0E48JGmBQ4ZupUYeCHR2bZKK3WERNCQf0t5AZBrSrXiWTuAILJG/jEHWZG1P7q/B529RTNdpyCqzXofroXpyCMdT34f7cRNc5G5ZZtzFwP9t0MocHH590rL8i0CvD9tMv27hJ+K1oy0zm6QubFa1VqvEA= Received: from BN6PR12CA0030.namprd12.prod.outlook.com (2603:10b6:405:70::16) by SN6PR02MB5438.namprd02.prod.outlook.com (2603:10b6:805:e7::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14; Thu, 28 Oct 2021 07:57:10 +0000 Received: from BN1NAM02FT035.eop-nam02.prod.protection.outlook.com (2603:10b6:405:70:cafe::bd) by BN6PR12CA0030.outlook.office365.com (2603:10b6:405:70::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18 via Frontend Transport; Thu, 28 Oct 2021 07:57:10 +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 BN1NAM02FT035.mail.protection.outlook.com (10.13.2.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4649.14 via Frontend Transport; Thu, 28 Oct 2021 07:57:09 +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; Thu, 28 Oct 2021 00:57:03 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Thu, 28 Oct 2021 00:57:03 -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=35870 helo=xndengvm004108.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1mg0HX-0005p5-Cr; Thu, 28 Oct 2021 00:57:03 -0700 From: Vijay Srivastava To: CC: , , , Vijay Kumar Srivastava Date: Thu, 28 Oct 2021 13:24:52 +0530 Message-ID: <20211028075452.11804-11-vsrivast@xilinx.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20211028075452.11804-1-vsrivast@xilinx.com> References: <20210706164418.32615-1-vsrivast@xilinx.com> <20211028075452.11804-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: ef6a47df-fb07-4b30-4820-08d999e88b6e X-MS-TrafficTypeDiagnostic: SN6PR02MB5438: 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: P0zshO4AJ4IrTtw/22zfOBMnlcw2GfN7KBK7TBcfpAchXfkSWOh+mdgLG8EVN8EgzQtXFHnG0zIheKI7tiWHqojNnEj+++7qRiqvCS28/F7espipIMS3O8Sp91KDpzAJfjZgY/O3TT05lRSTPGR7zX4Sqlfdr5AmpaQHlYIDbW93t37NyBUeBUAaJwtUJ6jswzsWMv+kdsHHeV8uLOttDJ8kqUZhB1wf25qVW8e0ASp8uY+zB9+83eSeII/9z6x2/kSeZS8NSrMMqcKne3VkUBIxEw0HCeGDcQ2tOGq9g51nxKV+Y1qEzJKNYkfLFv6KRI7TfloyEtAFVcqt4TQA0WbSZcklUjdYm7MOT6bAttj86LblyM9QR9Rx7WkhRPHMe+me+uhFng/rGnorO+iecO0fZMFePV3+iilNFsdRLv3uufsSYHqsVEABml6YLkXV+yQ/w8p3DWEI/hidN4aNjT57tL5JVicZ0sRzpb2M7IRtj4pZI5t7Zg6+dRvGNTlPl6Jzs08RLl/4ziXrzvMsfPiBIObWpEj4ZgDODrV3SC5UMRVEVBnyDS/nRZi3gd7nGXrAwc6J3JIivEaC9UM9LOun38nENWo4uEzhPedjmOXunMdxSP7d3YSxkgb8TdZ35MoAD8BpHtK451X7ATop0+VaDWM4HYM1/dRKeQiALJ5PMsiHMLlU4L8A58lXq8Ro9n06d3zLgQVFgrUbLSZ3H2G12OF4kCMWynBbzfHjIEQ= 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)(70586007)(70206006)(36906005)(186003)(2616005)(26005)(47076005)(8936002)(83380400001)(36756003)(9786002)(6916009)(336012)(1076003)(54906003)(426003)(6666004)(5660300002)(356005)(7636003)(316002)(508600001)(2906002)(4326008)(82310400003)(44832011)(36860700001)(7696005)(8676002)(107886003)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2021 07:57:09.8959 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef6a47df-fb07-4b30-4820-08d999e88b6e 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: BN1NAM02FT035.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR02MB5438 Subject: [dpdk-dev] [PATCH v2 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 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