From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 51EE3A2EFC for ; Fri, 20 Sep 2019 18:22:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5D0E81F52D; Fri, 20 Sep 2019 18:22:12 +0200 (CEST) Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680083.outbound.protection.outlook.com [40.107.68.83]) by dpdk.org (Postfix) with ESMTP id D16C61F50C; Fri, 20 Sep 2019 18:22:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OeoS7aJJBVJczE+mrCPsyVnqFMemud25x+cdRGKuBplNHjbs/5+EZD39VFdW2cvO5uedmYRfX5yBNHzMAVx4WsEwo+QIqTsGvK633NPBpsx5beA1oPmTCfH5duzsFjIXXpNX72ATIscbpzCOojwMhrAUTsQx9zAyl/jcObWcILoRolya3KxGLzPhEoVojBNUUgdvOzrhwMnc+TpFPNZ1rYf40uC6h+S0ytHeSWVwLZewbwS1sJenbd9K7WWeoVDNtbLoBYED5RKeoAiiaPD2glxwY8iC3BuPxE5+tDJw29xBTcImJl7W7kd5uYfYf3cTK6/YuP4XeK6IQMDktlnWiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=82e7a7fzlsQlm8qhQe92DoXfdJjAfI8FRnizJh6dHsY=; b=fyMotBBY2fKLsb0//klVZYiFHwuSS6yMgJTf6zgS4pGtCr5LzS5HvzioIr/C9L7OlWPRc8bQP9GfB/i1Fiu9Kw7fgW8VSK6NOSzji+Me1heya5Z93V1FX27yNH9PdiF3sSLC4b64d929EdBnPoRA/30aD6jsQ+A0maw+V9ZwgH//JMlN+JBEWpAKTmO6XEh4IBQrD7AI7d7el87dQAZORE1RxLAdh/U/lEoRcAplUYJgDEsCqrnrO107O0vlEAsRonkR9xYi79zSEqLsX+1afh8f9ljIDRviVx4hDD61WlAWXCF62TqEJLSUcbtiyC4TfwsYMXcnrv50SPIXzXXF9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=aquantia.com; dmarc=pass action=none header.from=aquantia.com; dkim=pass header.d=aquantia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=AQUANTIA1COM.onmicrosoft.com; s=selector2-AQUANTIA1COM-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=82e7a7fzlsQlm8qhQe92DoXfdJjAfI8FRnizJh6dHsY=; b=cyhsnJIJNz00ceONe/kPx7u3ovLQrPiYqwgJ1m9e1bWz543t6wXseHoGMvXHrnG2uT+K3/rGd51z4MF6luavun/AzX1r9Zk1FeFuPMH6TvGbzOYFG0cnCXqKK3D1cLpsJim+iXK73ane9wnGs4FlR4tsITdyXHzugWlw5BFYmjA= Received: from CY4PR1101MB2183.namprd11.prod.outlook.com (10.172.76.20) by CY4PR1101MB2165.namprd11.prod.outlook.com (10.174.54.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.19; Fri, 20 Sep 2019 16:22:05 +0000 Received: from CY4PR1101MB2183.namprd11.prod.outlook.com ([fe80::894e:7352:6cbd:bb25]) by CY4PR1101MB2183.namprd11.prod.outlook.com ([fe80::894e:7352:6cbd:bb25%11]) with mapi id 15.20.2284.009; Fri, 20 Sep 2019 16:22:05 +0000 From: Pavel Belous To: Ferruh Yigit CC: "dev@dpdk.org" , Igor Russkikh , Corey Melton , Pavel Belous , "stable@dpdk.org" Thread-Topic: [PATCH v2 2/3] net/atlantic: fix reported flow control mode Thread-Index: AQHVb8+K7Sd2PVLv1kSan+yxrhZjCA== Date: Fri, 20 Sep 2019 16:22:05 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR0401CA0063.eurprd04.prod.outlook.com (2603:10a6:3:19::31) To CY4PR1101MB2183.namprd11.prod.outlook.com (2603:10b6:910:18::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Pavel.Belous@aquantia.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [95.79.108.179] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f6c90a37-cf9e-4fea-e149-08d73de6acf6 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:CY4PR1101MB2165; x-ms-traffictypediagnostic: CY4PR1101MB2165: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:172; x-forefront-prvs: 0166B75B74 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(396003)(136003)(346002)(366004)(39850400004)(199004)(189003)(6506007)(386003)(76176011)(66446008)(66476007)(2616005)(102836004)(64756008)(2906002)(118296001)(316002)(50226002)(36756003)(186003)(8936002)(99286004)(26005)(6116002)(3846002)(8676002)(446003)(11346002)(256004)(52116002)(486006)(54906003)(44832011)(6916009)(476003)(81156014)(81166006)(66066001)(6486002)(25786009)(14454004)(66946007)(7736002)(5660300002)(6512007)(66556008)(86362001)(478600001)(6436002)(4326008)(71190400001)(305945005)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1101MB2165; H:CY4PR1101MB2183.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: aquantia.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: lCpKgEQDZeGkfIaVTfFAm9euk6pPc+GfMBZ4mSJ2BxJnBzW4INFG58FYqhADkYSfIz8ui8YDAgAlTYPfOEPr5pYcQss4448h1OfeKvhmoEgLgyZ6vx03fiYy3XKZzqT6aiBQ2rLjoAjD2/tjHXLcWj0jRKro5OGhbEsaw5p781jqWZZtqMKI+LXyf0imeF3wD32sEz/Lvwqlwu5tSBOhtc/jS0A7whfzOzg8vZCEx7HNFL9HRfOhAC5PzR856OMvnZUx6U3KXvyKbPKzBVTmbgQlzH67UUMA4Rh8dkW3CM90acubL0+Avou7WrYTlQtRthAxu7dHsk4DPmVoTJwaQuAv9AJ9rOOkQWJzMNUGLSBhQLbW78f1fOk+Qw5iFWBtjZBFGKx9bbQUoq5oALMYN83+bLArtr0KG8YzOgnMP2E= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: aquantia.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6c90a37-cf9e-4fea-e149-08d73de6acf6 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Sep 2019 16:22:05.4635 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 83e2e134-991c-4ede-8ced-34d47e38e6b1 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: T4RpmbgeaxVlsXbk3Kqb5Ll5w8wVsrw3a6Y0+BbguQ9S4g6SKX6H7Ca347vUkjbyZfb775tPHAiEZ0jXYiDgLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2165 Subject: [dpdk-dev] [PATCH v2 2/3] net/atlantic: fix reported flow control mode 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: Pavel Belous Driver reports current flow control mode based on internal flow control settings. Currently this logic works incorrectly. Fixes: 921eb6b8ce31 ("net/atlantic: fix flow control by sync settings on Rx= ") Cc: stable@dpdk.org Signed-off-by: Pavel Belous Signed-off-by: Igor Russkikh --- drivers/net/atlantic/atl_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_e= thdev.c index 178f7db..1b9d514 100644 --- a/drivers/net/atlantic/atl_ethdev.c +++ b/drivers/net/atlantic/atl_ethdev.c @@ -1535,11 +1535,11 @@ atl_flow_ctrl_get(struct rte_eth_dev *dev, struct r= te_eth_fc_conf *fc_conf) =20 if (fc =3D=3D AQ_NIC_FC_OFF) fc_conf->mode =3D RTE_FC_NONE; - else if (fc & (AQ_NIC_FC_RX | AQ_NIC_FC_TX)) + else if ((fc & AQ_NIC_FC_RX) && (fc & AQ_NIC_FC_TX)) fc_conf->mode =3D RTE_FC_FULL; else if (fc & AQ_NIC_FC_RX) fc_conf->mode =3D RTE_FC_RX_PAUSE; - else if (fc & AQ_NIC_FC_RX) + else if (fc & AQ_NIC_FC_TX) fc_conf->mode =3D RTE_FC_TX_PAUSE; =20 return 0; --=20 2.7.4