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 E603FA0C46; Mon, 27 Sep 2021 16:59:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40C7541167; Mon, 27 Sep 2021 16:58:26 +0200 (CEST) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mails.dpdk.org (Postfix) with ESMTP id 140A840E3C for ; Mon, 27 Sep 2021 15:36:45 +0200 (CEST) Received: by mail-pf1-f174.google.com with SMTP id c1so15828913pfp.10 for ; Mon, 27 Sep 2021 06:36:44 -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=uYXGv5KAGN81NBG+R6zTbbCyA5+WUJZdk0+ku+5DwrA=; b=NzBw0yYYgx0uI3p/429FJiHk/sPuJSlF/s3DvChu3sWOtIldiF+sfkvHmgdEHmpA59 QpNtouo3laYQ9XmrrUwhF7aiKsUGDMgeL0Na1fYrZ0MuOxaenEeZzhxlJMPDBiAx+hYj 7Hk+mS4TbSotBfqEZWBPRxLx780a+YSw3STmk= 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=uYXGv5KAGN81NBG+R6zTbbCyA5+WUJZdk0+ku+5DwrA=; b=6bL8XAUF8eqBDUBsuMGLq+tG1fCHKa7Vna7LP46bPgxKWYmDV0GimgZ8f3XP1k3gqz mWrfjomYMXDcBDQCngojaVgqGI9sz6V0K8BBoT8RzdBtm7jEDTDbdXpbHgtrH+wQbicH UBq3l9sv22luuSZeZLP5yEYxLjNPOSM4tPQfTIxgSrvVaChQZSEXHGvOvSmsaqqSxXQM Q3uS8Ylr1uVP+9Qdkur0bMUwVc2abrKJYSFNJDLb9ZYVKEnFbVzwSN4ZwHrCYVFXDJYp Qt8/bZ0vDPiKV4dWqp/1Ve7ZioCBFGpBFu06SwT+U5mY+FmkVXAwCb1SCrSwYaMhtUR8 V0/A== X-Gm-Message-State: AOAM5329mj11InsiomdH9/5K/+WFLmDYoPLrpEYkE/fhNEwd42UFJogv DwdWZ3xHxSoybabUbcnvVqb3kFRAY+gyvQ== X-Google-Smtp-Source: ABdhPJyG6Jw/Bb/sSVHTOAqEm1eY0WcHfUZBa8kfuKsm0EIhekWMvc8YJkTEjoxF20rNyuO+fSf72A== X-Received: by 2002:a63:e613:: with SMTP id g19mr16713400pgh.12.1632749804291; Mon, 27 Sep 2021 06:36:44 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 06:36:44 -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:47 +0530 Message-Id: <20210927133450.10653-17-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 16/19] net/mlx5: making module DPDK callbacks invalid 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" At present, DPDK module callbacks are not supported Signed-off-by: Srikanth Kaka Signed-off-by: Vag Singh Signed-off-by: Anand Thulasiram --- drivers/net/mlx5/freebsd/mlx5_ethdev_os.c | 60 +++-------------------- 1 file changed, 6 insertions(+), 54 deletions(-) diff --git a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c index a04bac8ed9..5940803cfc 100644 --- a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c @@ -909,28 +909,9 @@ int mlx5_get_module_info(struct rte_eth_dev *dev, struct rte_eth_dev_module_info *modinfo) { - struct ethtool_modinfo info = { - .cmd = ETHTOOL_GMODULEINFO, - }; - struct ifreq ifr = (struct ifreq) { - .ifr_data = (void *)&info, - }; - int ret = 0; - - if (!dev) { - DRV_LOG(WARNING, "missing argument, cannot get module info"); - rte_errno = EINVAL; - return -rte_errno; - } - ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr); - if (ret) { - DRV_LOG(WARNING, "port %u ioctl(SIOCETHTOOL) failed: %s", - dev->data->port_id, strerror(rte_errno)); - return ret; - } - modinfo->type = info.type; - modinfo->eeprom_len = info.eeprom_len; - return ret; + RTE_SET_USED(dev); + RTE_SET_USED(modinfo); + return -ENOTSUP; } /** @@ -947,38 +928,9 @@ mlx5_get_module_info(struct rte_eth_dev *dev, int mlx5_get_module_eeprom(struct rte_eth_dev *dev, struct rte_dev_eeprom_info *info) { - struct ethtool_eeprom *eeprom; - struct ifreq ifr; - int ret = 0; - - if (!dev) { - DRV_LOG(WARNING, "missing argument, cannot get module eeprom"); - rte_errno = EINVAL; - return -rte_errno; - } - eeprom = mlx5_malloc(MLX5_MEM_ZERO, - (sizeof(struct ethtool_eeprom) + info->length), 0, - SOCKET_ID_ANY); - if (!eeprom) { - DRV_LOG(WARNING, "port %u cannot allocate memory for " - "eeprom data", dev->data->port_id); - rte_errno = ENOMEM; - return -rte_errno; - } - eeprom->cmd = ETHTOOL_GMODULEEEPROM; - eeprom->offset = info->offset; - eeprom->len = info->length; - ifr = (struct ifreq) { - .ifr_data = (void *)eeprom, - }; - ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr); - if (ret) - DRV_LOG(WARNING, "port %u ioctl(SIOCETHTOOL) failed: %s", - dev->data->port_id, strerror(rte_errno)); - else - rte_memcpy(info->data, eeprom->data, info->length); - mlx5_free(eeprom); - return ret; + RTE_SET_USED(dev); + RTE_SET_USED(info); + return -ENOTSUP; } /** -- 2.30.2