From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D84C7C433E0 for ; Mon, 20 Jul 2020 15:30:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B25C822482 for ; Mon, 20 Jul 2020 15:30:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="fTHeSVsV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728694AbgGTPaP (ORCPT ); Mon, 20 Jul 2020 11:30:15 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:31446 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726899AbgGTPaO (ORCPT ); Mon, 20 Jul 2020 11:30:14 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06KFU3jJ028595; Mon, 20 Jul 2020 08:30:07 -0700 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=pfpt0818; bh=0xdZMKt+U7nc+qc2EGzH2Mt6XJPg3diT9cpjObCq0HM=; b=fTHeSVsV9iwWiZp0fu3DMWqzeZjVWtoh0abil1mm6B0C6HvhFnpLzSV4IMjEZcadQAHI AEcWL7+3OLOVLexYbT8uD9VMPMOze6ANAB4jucQWS++hgM3trIwKiWMcTnThU3SZXc5X Pfic51wcgSVsCc7D00aQPJPVRmObeXD6EY8GjHun1VLmbD6jF8GJEf0pPcxBO9z2kn/x mDW16wLnuYhN9UquJtfMj/eMt4kTXFwY8u3HCf9xdH3oa3HUBO1hSwvN/YJBIzxpIjAI u0kSZnw+ifw7H0W951Ok/aOfkDXYrD38QAw1QYXP2y9d7Ud0M9MZMKJEdavqWiweHxAP nA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 32bxenf600-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 20 Jul 2020 08:30:06 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 20 Jul 2020 08:30:05 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 20 Jul 2020 08:30:04 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 20 Jul 2020 08:30:04 -0700 Received: from NN-LT0049.marvell.com (NN-LT0049.marvell.com [10.193.54.6]) by maili.marvell.com (Postfix) with ESMTP id 46C623F703F; Mon, 20 Jul 2020 08:29:59 -0700 (PDT) From: Alexander Lobakin To: Joe Perches CC: Alexander Lobakin , Andrew Lunn , "David S. Miller" , Jakub Kicinski , Igor Russkikh , Michal Kalderon , Ariel Elior , "Denis Bolotin" , "James E.J. Bottomley" , "Martin K. Petersen" , , , , , Subject: Re: [PATCH v2 net-next 01/14] qed: convert link mode from u32 to bitmap Date: Mon, 20 Jul 2020 18:29:30 +0300 Message-ID: <20200720152930.8485-1-alobakin@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: <20200719212100.GM1383417@lunn.ch> <20200719201453.3648-1-alobakin@marvell.com> <20200719201453.3648-2-alobakin@marvell.com> <20200720092306.355-1-alobakin@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-20_09:2020-07-20,2020-07-20 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Joe, From: Joe Perches Date: Mon, 20 Jul 2020 08:19:52 -0700 > On Mon, 2020-07-20 at 12:23 +0300, Alexander Lobakin wrote: >> Date: Sun, 19 Jul 2020 23:21:00 +0200 From: Andrew Lunn >>> On Sun, Jul 19, 2020 at 11:14:40PM +0300, Alexander Lobakin wrote: >>>> Currently qed driver already ran out of 32 bits to store link modes, >>>> and this doesn't allow to add and support more speeds. >>>> Convert link mode to bitmap that will always have enough space for >>>> any number of speeds and modes. > [] >>> Why not just throw away all these QED_LM_ defines and use the kernel >>> link modes? The fact you are changing the u32 to a bitmap suggests the >>> hardware does not use them. >> >> I've just double-checked, and you're right, management firmware operates >> with NVM_* definitions, while QED_LM_* are used only in QED and QEDE to >> fill Ethtool link settings. >> I didn't notice this while working on the series, but it would be really >> a lot better to just use generic definitions. >> So I'll send v3 soon. > > While you're at it, why are you using __set_bit and not set_bit? Because I'm filling link modes and don't need any atomicity at all. If you refer linkmode_*() functions [1], they also use non-atomic variants of bitops. Al [1] https://elixir.bootlin.com/linux/v5.8-rc4/source/include/linux/linkmode.h