From patchwork Thu Oct 7 18:43:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srikanth Kaka X-Patchwork-Id: 100795 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D10DBA034F; Fri, 8 Oct 2021 12:58:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 650F5411D2; Fri, 8 Oct 2021 12:56:28 +0200 (CEST) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id B4193411E0 for ; Thu, 7 Oct 2021 20:45:27 +0200 (CEST) Received: by mail-pl1-f175.google.com with SMTP id a11so4556770plm.0 for ; Thu, 07 Oct 2021 11:45:27 -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=BwSgQPo9f7cKx226++pNxCH0sIuA4V71RVWkMbQ5Vd4=; b=IOQ3zo5r/pKn8spwKUgorJ/ZewL7RUk6o59KITXQef7YkFfwdih1JmghFzY3kWL2n5 JO2osk6pVD3/1PZHSXPqMi23RHBTlhHNe0Zd32SKqbws/GDUBsl4+xTswuUjLwlyF1f+ Mm4Z1n87dQzPul5/U1hynX3F4/R9AcO2DglZM= 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=BwSgQPo9f7cKx226++pNxCH0sIuA4V71RVWkMbQ5Vd4=; b=u24zsH/B6kmvAcLSme08gecz8K/nEPQtpeGCORK15o7khJ8JJ2O3Cg5QoW/HylPkCi MUPMmzEw1zqMhsXXbiropdMuHW0UZDXEV10VtH1e67PyuhKiIy2p5EwWH3n9QOty0A4r VczLRvhfvZRacFVI4FqBeBT3pQ8QhcbJerFoUBblQvMmqsDSYSIlLkevxSV8gfMJeMZd w1OI0I5/ByBDs5qxcxg09XAWeP4QUlI8a+dMszVjl32x9HEILWcQoji7qi7/YNoVshk6 qG9QW0luhl/Hsu7yeT23416zzDRLJM1C3KFC+1tVC9wD8yuB9hioY2mvZBxFtxaPSFWf LENA== X-Gm-Message-State: AOAM533+g20E9ypuHgCT+kOraeHLv56sWR0+JN86QRvQYnYK7c4IlzQP OUYHx/gOIDCjfYXrvKrma+XDkQ== X-Google-Smtp-Source: ABdhPJyYzsZSxGuD3vAEF+g/RFP76gqGuYJsClSTHYai/Y2x6C1SIXOxKWE6xsjPXWs4XzvMscaBEg== X-Received: by 2002:a17:902:b193:b029:11a:a179:453a with SMTP id s19-20020a170902b193b029011aa179453amr5160844plr.69.1633632327004; Thu, 07 Oct 2021 11:45:27 -0700 (PDT) Received: from srikanth-ThinkPad-T450.domain.name ([136.185.113.102]) by smtp.gmail.com with ESMTPSA id c11sm3311586pji.38.2021.10.07.11.45.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 11:45:26 -0700 (PDT) From: Srikanth Kaka To: Matan Azrad , Viacheslav Ovsiienko Cc: dev@dpdk.org, Vag Singh , Anand Thulasiram , Srikanth Kaka Date: Fri, 8 Oct 2021 00:13:36 +0530 Message-Id: <20211007184350.73858-28-srikanth.k@oneconvergence.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211007184350.73858-1-srikanth.k@oneconvergence.com> References: <20211007184350.73858-1-srikanth.k@oneconvergence.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 08 Oct 2021 12:55:54 +0200 Subject: [dpdk-dev] [PATCH v2 27/41] net/mlx5: add flow control callbacks 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" add flow control stub callbacks Signed-off-by: Srikanth Kaka Signed-off-by: Vag Singh Signed-off-by: Anand Thulasiram --- drivers/net/mlx5/freebsd/mlx5_ethdev_os.c | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c index 5b66e1802b..48099d0fc5 100644 --- a/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/freebsd/mlx5_ethdev_os.c @@ -372,6 +372,52 @@ mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete) return ret; } +/** + * DPDK callback to get flow control status. + * + * @param dev + * Pointer to Ethernet device structure. + * @param[out] fc_conf + * Flow control output buffer. + * + * @return + * 0 on success, a negative errno value otherwise and rte_errno is set. + */ +int +mlx5_dev_get_flow_ctrl(struct rte_eth_dev *dev, + struct rte_eth_fc_conf *fc_conf) +{ + RTE_SET_USED(fc_conf); + DRV_LOG(WARNING, + "port %u get flow control status operation not supported", + dev->data->port_id); + + return -EOPNOTSUPP; +} + +/** + * DPDK callback to modify flow control parameters. + * + * @param dev + * Pointer to Ethernet device structure. + * @param[in] fc_conf + * Flow control parameters. + * + * @return + * 0 on success, a negative errno value otherwise and rte_errno is set. + */ +int +mlx5_dev_set_flow_ctrl(struct rte_eth_dev *dev, + struct rte_eth_fc_conf *fc_conf) +{ + RTE_SET_USED(fc_conf); + DRV_LOG(WARNING, + "port %u modify flow control operation not supported", + dev->data->port_id); + + return -EOPNOTSUPP; +} + /** * Handle asynchronous removal event for entire multiport device. *