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 DE1E7A0C46; Mon, 27 Sep 2021 16:58:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10B5141104; Mon, 27 Sep 2021 16:58:13 +0200 (CEST) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mails.dpdk.org (Postfix) with ESMTP id E12B140E3C for ; Mon, 27 Sep 2021 15:36:13 +0200 (CEST) Received: by mail-pg1-f181.google.com with SMTP id s75so1312468pgs.5 for ; Mon, 27 Sep 2021 06:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oneconvergence.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CJUblWHtW7DfBvkUvHJGMZkYZvNjIpYnUNKkqbLHfQo=; b=WbV2SgX41mxm2xcaP3eKp+bN61Eu/NKvEgHjUdqaAz8nu6zK4AfSEYZrso03MnB0It yB5ZLD9uLlynea0yade7kOBxyVMqMvwp/Vc9bfOmnUwrJt4BHvq2pMTnEwiLz35hDjzh b6O96i73NHEDbyTa7KRuz+9YmxMmRUdR4vM7M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CJUblWHtW7DfBvkUvHJGMZkYZvNjIpYnUNKkqbLHfQo=; b=pPYKiK+gkXuGMXKH//8Qdj1O94KZbe2UDvwtj/FHK8HUjXU357uYg40nCVO2dVG7UC 2kFMzClSpVgxleBAQhAQWyvs9u6PWFts3/lki4uFigzorz/09gh6mYU47+ncrcGfF3/s gfC5L06ieMAIpqHsU347YE4fqi6Sryk3ZIRaeyO/15EOMtFsYil4R41hJ8MJx5DQkFP4 IkBdOFu6wc1sBXBOy1G7tJK/Jkd1EJIKRZH2R/XI33XWdBnpelP6zwbrUgEp0LzLsjGw +Q9bEK1CMHsTByJMItHg0SltV56njeyPCspakmq7PkWJ8A2zxCslyGzL1NtNGr/5NV1V xUUQ== X-Gm-Message-State: AOAM533FbMGlQZkeRNSt3SvlYjRRu+W/ltC4FXUbwfR6qh9WWroBWkqK 2dE4VrqX2Pl3ymk1cXmAiQ2zerOV/PUS1g== X-Google-Smtp-Source: ABdhPJwvvKBRWRgfhBUIAQj5TskmZWlHLq5+nOyowqBZ2JuTTry6M29cGHuP8Lp0OInJzkNviELFTA== X-Received: by 2002:aa7:9846:0:b0:444:5517:fa17 with SMTP id n6-20020aa79846000000b004445517fa17mr24012925pfq.85.1632749773045; Mon, 27 Sep 2021 06:36:13 -0700 (PDT) Received: from srikanth-ThinkPad-T450.domain.name ([223.178.22.200]) by smtp.gmail.com with ESMTPSA id t6sm17342274pfh.63.2021.09.27.06.36.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 06:36:12 -0700 (PDT) From: Srikanth Kaka To: Matan Azrad , Viacheslav Ovsiienko Cc: dev@dpdk.org, Vag Singh , Anand Thulasiram , Srikanth Kaka Date: Mon, 27 Sep 2021 19:04:35 +0530 Message-Id: <20210927133450.10653-5-srikanth.k@oneconvergence.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210927133450.10653-1-srikanth.k@oneconvergence.com> References: <20210927133450.10653-1-srikanth.k@oneconvergence.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 27 Sep 2021 16:58:07 +0200 Subject: [dpdk-dev] [PATCH 04/19] net/mlx5: disabling auxiliary bus support 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" Disabling auxiliary bus support in FreeBSD at this moment Signed-off-by: Srikanth Kaka Signed-off-by: Vag Singh Signed-off-by: Anand Thulasiram --- drivers/net/mlx5/freebsd/mlx5_ethdev_os.c | 12 ------ drivers/net/mlx5/freebsd/mlx5_os.c | 52 +---------------------- drivers/net/mlx5/freebsd/mlx5_os.h | 2 - 3 files changed, 2 insertions(+), 64 deletions(-) diff --git a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c index f34133e2c6..5cf3eab65a 100644 --- a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c @@ -128,18 +128,6 @@ struct ethtool_link_settings { #define ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT 2 /* 66 - 64 */ #endif -/* Get interface index from SubFunction device name. */ -int -mlx5_auxiliary_get_ifindex(const char *sf_name) -{ - char if_name[IF_NAMESIZE] = { 0 }; - - if (mlx5_auxiliary_get_child_name(sf_name, "/net", - if_name, sizeof(if_name)) != 0) - return -rte_errno; - return if_nametoindex(if_name); -} - /** * Get interface name from private structure. * diff --git a/drivers/net/mlx5/freebsd/mlx5_os.c b/drivers/net/mlx5/freebsd/mlx5_os.c index 3746057673..616bb73744 100644 --- a/drivers/net/mlx5/freebsd/mlx5_os.c +++ b/drivers/net/mlx5/freebsd/mlx5_os.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -2716,57 +2715,10 @@ mlx5_os_pci_probe(struct rte_pci_device *pci_dev) } return ret; } - -/* Probe a single SF device on auxiliary bus, no representor support. */ -static int -mlx5_os_auxiliary_probe(struct rte_device *dev) -{ - struct rte_eth_devargs eth_da = { .nb_ports = 0 }; - struct mlx5_dev_config config; - struct mlx5_dev_spawn_data spawn = { .pf_bond = -1 }; - struct rte_auxiliary_device *adev = RTE_DEV_TO_AUXILIARY(dev); - struct rte_eth_dev *eth_dev; - int ret = 0; - - /* Parse ethdev devargs. */ - ret = mlx5_os_parse_eth_devargs(dev, ð_da); - if (ret != 0) - return ret; - /* Set default config data. */ - mlx5_os_config_default(&config); - config.sf = 1; - /* Init spawn data. */ - spawn.max_port = 1; - spawn.phys_port = 1; - spawn.phys_dev = mlx5_os_get_ibv_dev(dev); - if (spawn.phys_dev == NULL) - return -rte_errno; - ret = mlx5_auxiliary_get_ifindex(dev->name); - if (ret < 0) { - DRV_LOG(ERR, "failed to get ethdev ifindex: %s", dev->name); - return ret; - } - spawn.ifindex = ret; - spawn.numa_node = dev->numa_node; - /* Spawn device. */ - eth_dev = mlx5_dev_spawn(dev, &spawn, &config, ð_da); - if (eth_dev == NULL) - return -rte_errno; - /* Post create. */ - eth_dev->intr_handle = &adev->intr_handle; - if (rte_eal_process_type() == RTE_PROC_PRIMARY) { - eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC; - eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_RMV; - eth_dev->data->numa_node = dev->numa_node; - } - rte_eth_dev_probing_finish(eth_dev); - return 0; -} - /** * Net class driver callback to probe a device. * - * This function probe PCI bus device(s) or a single SF on auxiliary bus. + * This function probe PCI bus device(s) * * @param[in] dev * Pointer to the generic device. @@ -2790,7 +2742,7 @@ mlx5_os_net_probe(struct rte_device *dev) if (mlx5_dev_is_pci(dev)) return mlx5_os_pci_probe(RTE_DEV_TO_PCI(dev)); else - return mlx5_os_auxiliary_probe(dev); + return -ENOTSUP; } static int diff --git a/drivers/net/mlx5/freebsd/mlx5_os.h b/drivers/net/mlx5/freebsd/mlx5_os.h index 2991d37df2..af7cbeb418 100644 --- a/drivers/net/mlx5/freebsd/mlx5_os.h +++ b/drivers/net/mlx5/freebsd/mlx5_os.h @@ -19,6 +19,4 @@ enum { #define MLX5_NAMESIZE IF_NAMESIZE -int mlx5_auxiliary_get_ifindex(const char *sf_name); - #endif /* RTE_PMD_MLX5_OS_H_ */ -- 2.30.2