Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3268948pxb; Sat, 9 Oct 2021 06:14:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2HQbbrTo9sC79Yb5e8PUiADiyqoZWfqU/yHHTX5YYqIGgU9E0YMl0I9ZBZV8uKu8FyiXq X-Received: by 2002:a17:90a:ab15:: with SMTP id m21mr18714382pjq.166.1633785291761; Sat, 09 Oct 2021 06:14:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633785291; cv=none; d=google.com; s=arc-20160816; b=FNHmMFDLZbO9RueWq5y0+lHMAZsO1ILDbpEL4XrP/OtHoyNQBD24bVKNN5U9VW/vKz qKi49IOWNayBbSmleTORH2BgQV2+vSgMIVuR0FE318bGXlXhUeaduagatRuwTd5H7Irx Ha9TkgbIGIHIgO8Mkg80klNM2vR+vYYWuwEG+koa3wqVG6OrPuEGIdsmzkhQFElj9HjG lkrqgyhBQTK8SEHH0PxMCB5GtChwPzPjwdEctpsmVAj3pkXu4u3S+8FzMQ/Na1Iy/lwl KjibBFeNr96kIoJE4HakziAlukD0lQpyOPnowbCUJzFHNn5LUezQcoWP+1nJUpPOTn4s fTeA== 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 :message-id:date:subject:cc:to:from; bh=XrxcDCnb1SvRL5MlCwyjG90/ax6GUSpQrNZBuz1rZj0=; b=dIilhikU8hIfJf4emTFruYtU9jS85fzjF7Ant8tibvUh1hG2NX1UtQ6YluTiSyZWal IFHNBpKiM9yBRGdR/iDRL2FSyqFsFFWjTaI7ezisvX+y5rmczhwDyX8UBzgjz9mYsmGy iOSABtRBTVfQM8SQrOXpNcgd36TBsLe/UCDLc7ZW86jnwAXthUMM6G5gVu0kNn9cXKTi +F7l4WuMuXTUhbNinJQph0QzqyW2OKmdLGT62cqrLpK2ypfR3sLEuECNBAMhAANkqAgX 4Ulxz9tGU+whZUp1dvZtw9bFQHenipZTO8RLrN0Hz6z2r1g+uDd2TXW3BnMl3+ColNPD JkHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r2si2799726pga.96.2021.10.09.06.14.38; Sat, 09 Oct 2021 06:14:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233269AbhJINPY (ORCPT + 99 others); Sat, 9 Oct 2021 09:15:24 -0400 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:52341 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233141AbhJINPV (ORCPT ); Sat, 9 Oct 2021 09:15:21 -0400 Received: from tomoyo.flets-east.jp ([114.149.34.46]) by smtp.orange.fr with ESMTPA id ZC9zmoEn4UGqlZCA6m2idT; Sat, 09 Oct 2021 15:13:16 +0200 X-ME-Helo: tomoyo.flets-east.jp X-ME-Auth: MDU0YmViZGZmMDIzYiBlMiM2NTczNTRjNWZkZTMwOGRiOGQ4ODf3NWI1ZTMyMzdiODlhOQ== X-ME-Date: Sat, 09 Oct 2021 15:13:16 +0200 X-ME-IP: 114.149.34.46 From: Vincent Mailhol To: Marc Kleine-Budde , linux-can@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Mailhol Subject: [PATCH v2 0/3] report the controller capabilities through the netlink interface Date: Sat, 9 Oct 2021 22:13:01 +0900 Message-Id: <20211009131304.19729-1-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The main purpose of this series is to report the CAN controller capabilities. The proposed method reuses the existing struct can_ctrlmode and thus do not need a new IFLA_CAN_* entry. While doing so, I also realized that can_priv::ctrlmode_static could actually be derived from the other ctrlmode fields. So I added two extra patches to the series: one to replace that field with a function and one to repack struct can_priv and fill the hole created after removing can_priv::ctrlmode_priv. Please note that the first two patches are not required by the third one. I am just grouping everything in the same series because the patches all revolve around the controller modes. ** Changelog ** v1 -> v2: - Add a first patch to replace can_priv::ctrlmode_static by the inline function can_get_static_ctrlmode() - Add a second patch to reorder the fields of struct can_priv for better packing (save eight bytes on x86_64 \o/) - Rewrite the comments of the third patch "can: netlink: report the CAN controller mode supported flags" (no changes on the code itself). Vincent Mailhol (3): can: dev: replace can_priv::ctrlmode_static by can_get_static_ctrlmode() can: dev: reorder struct can_priv members for better packing can: netlink: report the CAN controller mode supported flags drivers/net/can/dev/dev.c | 5 +++-- drivers/net/can/dev/netlink.c | 7 +++++-- include/linux/can/dev.h | 18 +++++++++++++----- include/uapi/linux/can/netlink.h | 5 ++++- 4 files changed, 25 insertions(+), 10 deletions(-) -- 2.32.0