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 78EE9A0577; Tue, 14 Apr 2020 08:17:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E6D9A1C066; Tue, 14 Apr 2020 08:17:20 +0200 (CEST) Received: from rcdn-iport-3.cisco.com (rcdn-iport-3.cisco.com [173.37.86.74]) by dpdk.org (Postfix) with ESMTP id C40BB1BEE0 for ; Tue, 14 Apr 2020 08:17:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1216; q=dns/txt; s=iport; t=1586845039; x=1588054639; h=from:to:cc:subject:date:message-id:mime-version; bh=NrNX+ukSxCLxrHEM3deRCunBAN4+V1U9Ihr5KyawNuM=; b=HJ65lMbTFaAXF7xdDqDZe4sRhV93Ng5AuRWh7cwLsKOAhr7ndSfOPMm6 Z2WnDeqYBZzNREM5rwN1Uh6BltKYnX7zYsL0cSpsCDWhHnxGclzNLznxx RSmKsE8tnZkadBuCAkMtrOkMPIkdUttCz5lhkqfU9/x8FX/S1/yPTR/0Q Y=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BGAAANVZVe/4cNJK1mHQEBAQkBEQU?= =?us-ascii?q?FAYFnCAELAYIogUEBATAqCow0km2PUYF7CgEBAQwBAS8EAQGERIISJDQJDgI?= =?us-ascii?q?DAQELAQEFAQEBAgEFBG2FYoZwgT4OBYMmglglrQqCJ4VOgz+BQIE4AYdPhGU?= =?us-ascii?q?agUE/hF+FG4UjBLFXgkyXRAwdnCgBrB0CERWBUjmBV00jFYMkUBgNmhsXjic?= =?us-ascii?q?/AQExjl4BgQ8BAQ?= X-IronPort-AV: E=Sophos;i="5.72,381,1580774400"; d="scan'208";a="738511519" Received: from alln-core-2.cisco.com ([173.36.13.135]) by rcdn-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 14 Apr 2020 06:17:18 +0000 Received: from XCH-RCD-001.cisco.com (xch-rcd-001.cisco.com [173.37.102.11]) by alln-core-2.cisco.com (8.15.2/8.15.2) with ESMTPS id 03E6HImS002835 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL) for ; Tue, 14 Apr 2020 06:17:18 GMT Received: from ja-VirtualBox.cisco.com (10.61.89.108) by XCH-RCD-001.cisco.com (173.37.102.11) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 14 Apr 2020 01:17:17 -0500 From: Jakub Grajciar To: CC: Jakub Grajciar Date: Tue, 14 Apr 2020 08:16:54 +0200 Message-ID: <20200414061654.29459-1-jgrajcia@cisco.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.61.89.108] X-ClientProxiedBy: xch-aln-002.cisco.com (173.36.7.12) To XCH-RCD-001.cisco.com (173.37.102.11) X-Outbound-SMTP-Client: 173.37.102.11, xch-rcd-001.cisco.com X-Outbound-Node: alln-core-2.cisco.com Subject: [dpdk-dev] [PATCH] net/memif: implement promisc enable/disable 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" implement promisc enable/disable for memif PMD Signed-off-by: Jakub Grajciar --- drivers/net/memif/rte_eth_memif.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 81d71c53a..d138ec89e 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -1418,6 +1418,20 @@ memif_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t qid __rte_unused) return 0; } +static int +memif_promisc_enable(struct rte_eth_dev *dev __rte_unused) +{ + /* memif works in promisc mode only */ + return 0; +} + +static int +memif_promisc_disable(struct rte_eth_dev *dev __rte_unused) +{ + /* memif works in promisc mode only */ + return 0; +} + static const struct eth_dev_ops ops = { .dev_start = memif_dev_start, .dev_close = memif_dev_close, @@ -1432,6 +1446,8 @@ static const struct eth_dev_ops ops = { .link_update = memif_link_update, .stats_get = memif_stats_get, .stats_reset = memif_stats_reset, + .promiscuous_enable = memif_promisc_enable, + .promiscuous_disable = memif_promisc_disable, }; static int -- 2.17.1