From patchwork Wed Dec 2 10:12:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liron Himi X-Patchwork-Id: 84702 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A8923A04DB; Wed, 2 Dec 2020 11:22:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F2998CB56; Wed, 2 Dec 2020 11:13:16 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id DA633C9C4 for ; Wed, 2 Dec 2020 11:13:13 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 0B2A58xc001879 for ; Wed, 2 Dec 2020 02:13:12 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=S8TT4i/Sidd4VJ8nOAMwJhO3NWU17Xr6WbX3ZsphZ/Y=; b=ffS7S7L6/DbnhiloPRWtotf59WAnx6mIVJ4SX+KtMKw3aFtIJ/2hyk6Lr+FaTPqzjzl/ ZsS8PEPUhrXEl5iGfeFb5EH+icoFTOvDSbWL3khBKmErRdCezF6OXVkf2k1E3ktGkAze BSPWy1/fTX5s/HVoMmU0kbmQ0B+/M1HIXkXTd7dnUnjNzjq3BP4/tdwOeDePMxo7zI1E RpowPanc/jsaiemxjYxcrjR+7Ho8yOWmxzitrqVnqvjMEvdjvsTI1XkQTJdKKhRsjeNV RFN3dxsvTFInEhbMREJdMw1Uop0RwM9HwtLc2dPUfovNwcJfR8xK+g6vBxTQJ8ECW+Lc vw== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 3568jf82aa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 02 Dec 2020 02:13:12 -0800 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Dec 2020 02:13:11 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 2 Dec 2020 02:13:10 -0800 Received: from pt-lxl0023.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 2 Dec 2020 02:13:09 -0800 From: To: CC: , Yuri Chipchev , Liron Himi Date: Wed, 2 Dec 2020 12:12:03 +0200 Message-ID: <20201202101212.4717-30-lironh@marvell.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201202101212.4717-1-lironh@marvell.com> References: <20201202101212.4717-1-lironh@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-12-02_04:2020-11-30, 2020-12-02 signatures=0 Subject: [dpdk-dev] [PATCH v1 29/38] net/mvpp2: autoneg disable handling X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" From: Yuri Chipchev flow control autoneg disable is not supported Signed-off-by: Yuri Chipchev Reviewed-by: Liron Himi Reviewed-by: Michael Shamis Signed-off-by: Yuri Chipchev Reviewed-by: Liron Himi --- drivers/net/mvpp2/mrvl_ethdev.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index 66c3c8e57..535d7cc60 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -2135,6 +2135,7 @@ mrvl_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) if (!priv) return -EPERM; + fc_conf->autoneg = 1; ret = pp2_ppio_get_rx_pause(priv->ppio, &en); if (ret) { MRVL_LOG(ERR, "Failed to read rx pause state"); @@ -2184,13 +2185,17 @@ mrvl_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) if (fc_conf->high_water || fc_conf->low_water || fc_conf->pause_time || - fc_conf->mac_ctrl_frame_fwd || - fc_conf->autoneg) { + fc_conf->mac_ctrl_frame_fwd) { MRVL_LOG(ERR, "Flowctrl parameter is not supported"); return -EINVAL; } + if (fc_conf->autoneg == 0) { + MRVL_LOG(ERR, "Flowctrl Autoneg disable is not supported"); + return -EINVAL; + } + switch (fc_conf->mode) { case RTE_FC_FULL: rx_en = 1;