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 137A8A0C46; Mon, 27 Sep 2021 16:59:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30FDF41160; Mon, 27 Sep 2021 16:58:25 +0200 (CEST) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mails.dpdk.org (Postfix) with ESMTP id 51CBF410DD for ; Mon, 27 Sep 2021 15:36:42 +0200 (CEST) Received: by mail-pf1-f181.google.com with SMTP id k26so11283064pfi.5 for ; Mon, 27 Sep 2021 06:36:42 -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=GjD7K36Y1aAAnZ7qIhh2JsrWxOzpSSUaDYMXpqghqqU=; b=TxDamhxjdh4hIDbErZXGnuHZl7cnZR7Y9yNvXs8Osr0bJw4Nv2/BLFFgsA7eLgSKT2 GFDKQLfiNojKupetc25xs0kBUEjRe1AXWlsqMWgUV0Kl7c0U9dVnc2KxjpmImb/6HYuw WTbCxtbzi+TzMAhJfnjPKtL0gd5NyViNF3Uh8= 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=GjD7K36Y1aAAnZ7qIhh2JsrWxOzpSSUaDYMXpqghqqU=; b=SUHBoXF2H8q5kKMsZ1mgxsvLN5CAWLlOsCNidXW3BTY30MX3cg63GhZYNqzZyfH2ic vPK2BNdwbKqlu1+2bSkKa4CpidTYFSzJx5oYgc2BfC1ExXGlFZKxG1ePPALiWZaxkLIx xw1m8zqeXf+oSRqWIiLqXfQKZ1rV6nm3uAB9L0h5N3zkhxhd3GrBNl7Ee+QFkrRWSXsK djqdBbFmuO0zedwGMXT9wB4jQ6tC4jZQ2vPOCZiqUsUQevSC+/5F26ub+P+yxbkAID/X SnZLIpMRP3kN2fw5aupm1BzWPQmZVKQ3EhUk11dAp1thq3uwsxXMXGgBpvXb1+MAXjiJ WkkQ== X-Gm-Message-State: AOAM532bHuPUOzibz3J/+K5UppURtNeFQwbYIeeHJm1mP8pQC1FAeXrJ tKuF3m2GHY0g37N9vgTqYBBRwA== X-Google-Smtp-Source: ABdhPJzktf9eT1maruXlGVn/MYEsWd8uXDTgINrPsLABAIuMhmWhFORqqt0iPv2QtKz0SBuQp7Ta2g== X-Received: by 2002:a05:6a00:983:b0:444:ac28:1ee1 with SMTP id u3-20020a056a00098300b00444ac281ee1mr23914484pfg.49.1632749801528; Mon, 27 Sep 2021 06:36:41 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 06:36:41 -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:46 +0530 Message-Id: <20210927133450.10653-16-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 15/19] net/mlx5: making flow control DPDK callback 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, flow control CBs are not being supported on FreeBSD Signed-off-by: Srikanth Kaka Signed-off-by: Vag Singh Signed-off-by: Anand Thulasiram --- drivers/net/mlx5/freebsd/mlx5_ethdev_os.c | 61 ++++------------------- 1 file changed, 10 insertions(+), 51 deletions(-) diff --git a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c index f1946fa9f6..a04bac8ed9 100644 --- a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c @@ -414,31 +414,12 @@ mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete) int mlx5_dev_get_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) { - struct ifreq ifr; - struct ethtool_pauseparam ethpause = { - .cmd = ETHTOOL_GPAUSEPARAM - }; - int ret; + RTE_SET_USED(fc_conf); + DRV_LOG(WARNING, + "port %u can not get flow control status. Operation not supported in FreeBSD", + dev->data->port_id); - ifr.ifr_data = (void *)ðpause; - ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr); - if (ret) { - DRV_LOG(WARNING, - "port %u ioctl(SIOCETHTOOL, ETHTOOL_GPAUSEPARAM) failed:" - " %s", - dev->data->port_id, strerror(rte_errno)); - return ret; - } - fc_conf->autoneg = ethpause.autoneg; - if (ethpause.rx_pause && ethpause.tx_pause) - fc_conf->mode = RTE_FC_FULL; - else if (ethpause.rx_pause) - fc_conf->mode = RTE_FC_RX_PAUSE; - else if (ethpause.tx_pause) - fc_conf->mode = RTE_FC_TX_PAUSE; - else - fc_conf->mode = RTE_FC_NONE; - return 0; + return -EOPNOTSUPP; } /** @@ -455,34 +436,12 @@ mlx5_dev_get_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) int mlx5_dev_set_flow_ctrl(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) { - struct ifreq ifr; - struct ethtool_pauseparam ethpause = { - .cmd = ETHTOOL_SPAUSEPARAM - }; - int ret; - - ifr.ifr_data = (void *)ðpause; - ethpause.autoneg = fc_conf->autoneg; - if (((fc_conf->mode & RTE_FC_FULL) == RTE_FC_FULL) || - (fc_conf->mode & RTE_FC_RX_PAUSE)) - ethpause.rx_pause = 1; - else - ethpause.rx_pause = 0; + RTE_SET_USED(fc_conf); + DRV_LOG(WARNING, + "port %u can not modify flow control. Operation not supported in FreeBSD", + dev->data->port_id); - if (((fc_conf->mode & RTE_FC_FULL) == RTE_FC_FULL) || - (fc_conf->mode & RTE_FC_TX_PAUSE)) - ethpause.tx_pause = 1; - else - ethpause.tx_pause = 0; - ret = mlx5_ifreq(dev, SIOCETHTOOL, &ifr); - if (ret) { - DRV_LOG(WARNING, - "port %u ioctl(SIOCETHTOOL, ETHTOOL_SPAUSEPARAM)" - " failed: %s", - dev->data->port_id, strerror(rte_errno)); - return ret; - } - return 0; + return -EOPNOTSUPP; } /** -- 2.30.2