Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp806685pxj; Thu, 27 May 2021 12:04:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8yW69pgJFepsOCX9qr5oSmj6CbSj0miz/ePzj9temi3Gwg8XzGGiCPy2O66pItHK6mqzt X-Received: by 2002:a17:906:408d:: with SMTP id u13mr5602877ejj.128.1622142290021; Thu, 27 May 2021 12:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622142290; cv=none; d=google.com; s=arc-20160816; b=P811z84aiCZLxkbOv8nyBeGnk9DDD9aAKY+jjXhtU5m/OpLXAOI/4fKBhBpKPvk6xg eOuXhX9KYnMPKSFniEQwMJ53lv/oOfToMYX3PkY2T9NvAJeqwz5CsEEVvSR3agurCcX8 HeFbGV0U8foxiI7ixibqRa7Vc0PT56spTqFQZ5NyXzEaB8qzmL0HMz9Vdxf0vm72eHEb ZRoutZLxRJGa3K7lNAiDHQFC5nRuiaQUjHQGgbLkmFDMl9U90sZO/IRtBgb7GmZxwiPb VGYutRJ9DZRchaywNoIhWLt5H04RGG52qoAKDgQDZR5Iq5puWcJSm3OkuWOTYFRzk8va YlWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=bfodxlAPINMQ+QXi4WtDFcrupbqPtqizHM9w8hB1HJ8=; b=yed3qhK0qspxankW3nZUEvE7PbC3yDFtp/Ld71qIh1Y5IFrS6a9cwiGB+nMnhJ8C+Y LoStuhUHp1RXZPBVD8tseqrAEPYamvXLyjcWRiG+/f/oFbRqZsIsUfn2RjZiBVGjjGjt 31FwhMKQtiLxWupyueqNV2vJjRFMPfIhUE7F3yiUP3H5KPZPWpD8YRJXvNqVez9BwCdY jlKwZGIaiQfMgcdZAES5yIWujVosZ/kMjEvi48TR0Zegrq5Kduyi90DUARCQyjDqQi5E hlLeMpP+I+1gSpKeSkM+7DPM+mCb+A9prn/PsjvQlUu0KKEOFzpbKoU8HwKoEKPvUIZg tARQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KnAd4Ie6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gn42si4156148ejc.47.2021.05.27.12.04.25; Thu, 27 May 2021 12:04:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KnAd4Ie6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234635AbhE0RjW (ORCPT + 99 others); Thu, 27 May 2021 13:39:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:32856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234594AbhE0RjU (ORCPT ); Thu, 27 May 2021 13:39:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6456B613BE; Thu, 27 May 2021 17:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622137067; bh=Irw+MU3BjYuP1C6dvrSGvPjgSbyAD0Zx9yR6o9g4Pho=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KnAd4Ie6fWQ2YKj7k4WKNckCSIOEsVUF80j8tCFzCv4JCsfDOJKPJBNvTr+CCIImE aIjZu7VHhyYviBlz+saqf/xdgb1nJZS1oh7p1SvCfXk85cG3Qhb6VydDWEEQHWTAEs muRCRlnHgCyb1Tqcu6/Gp55x4DJl8t3+vt1jY5BJeM2v3LlIVQ2qW/XdULhVpC/FPH F5xhBL3b5aUCJqfMEQI9C0kH1nN4ePO65UTz4rG6h9jz4PAAL3yGG3A6C+78cpc5ii 8zw/azz0np4S5cMfP9f9Z0xd/AvbAApnH+9vu/law2y//MFB5Ilq2BhLrhZX/6Wyj/ nT/zG14UsWv3g== Date: Thu, 27 May 2021 10:37:45 -0700 From: Jakub Kicinski To: Huazhong Tan Cc: , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [RFC net-next 2/4] ethtool: extend coalesce setting uAPI with CQE mode Message-ID: <20210527103745.5005b5df@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: References: <1622021262-8881-1-git-send-email-tanhuazhong@huawei.com> <1622021262-8881-3-git-send-email-tanhuazhong@huawei.com> <20210526170033.62c8e6eb@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, 27 May 2021 10:00:44 +0800 Huazhong Tan wrote: > >> @@ -179,6 +179,8 @@ __ethtool_get_link_ksettings(struct net_device *dev, > >> > >> struct kernel_ethtool_coalesce { > >> struct ethtool_coalesce base; > >> + __u32 use_cqe_mode_tx; > >> + __u32 use_cqe_mode_rx; > > No __ in front, this is not a user space structure. > > Why not bool or a bitfield? > > bool is enough, __u32 is used here to be consistent with > > fields in struct ethtool_coalesce. > > This seems unnecessary? Yup, I think the IOCTL made everything a __u32 for uniformity of the uAPI and to avoid holes and paddings. This is an internal kernel structure so natural types like bool are better.