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 DCB8445EBD; Mon, 16 Dec 2024 12:12:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 71A9A4025F; Mon, 16 Dec 2024 12:12:05 +0100 (CET) Received: from shelob.oktetlabs.ru (unknown [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id CBC0D40144 for ; Mon, 16 Dec 2024 12:12:03 +0100 (CET) Received: by shelob.oktetlabs.ru (Postfix, from userid 115) id 3027A5A; Mon, 16 Dec 2024 14:12:03 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on mail1.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD autolearn=no autolearn_force=no version=4.0.0 DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 8359350 Authentication-Results: shelob.oktetlabs.ru/8359350; dkim=none; dkim-atps=neutral Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id 8359350 for ; Mon, 16 Dec 2024 14:12:02 +0300 (MSK) From: Andrew Rybchenko To: dev@dpdk.org Subject: [PATCH] net/sfc: avoid duplicate configuration restore Date: Mon, 16 Dec 2024 14:11:41 +0300 Message-Id: <20241216111141.1578426-1-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 MAC address, promiscuous and all-multicast modes are restored correctly upon device start by the PMD itself. ethdev layer should not duplicate it. Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/sfc_ethdev.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index 89444f0b4a..82fbdbae9c 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -2722,6 +2722,14 @@ sfc_fec_set(struct rte_eth_dev *dev, uint32_t fec_capa) return -rc; } +static uint64_t +sfc_get_restore_flags(__rte_unused struct rte_eth_dev *dev, + __rte_unused enum rte_eth_dev_operation op) +{ + /* sfc PMD does not require any configuration restore */ + return 0; +} + static const struct eth_dev_ops sfc_eth_dev_ops = { .dev_configure = sfc_dev_configure, .dev_start = sfc_dev_start, @@ -2774,6 +2782,7 @@ static const struct eth_dev_ops sfc_eth_dev_ops = { .fec_get_capability = sfc_fec_get_capability, .fec_get = sfc_fec_get, .fec_set = sfc_fec_set, + .get_restore_flags = sfc_get_restore_flags, }; struct sfc_ethdev_init_data { -- 2.39.5