netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, mlxsw@mellanox.com, idosch@mellanox.com,
	jakub.kicinski@netronome.com, f.fainelli@gmail.com,
	andrew@lunn.ch, vivien.didelot@gmail.com,
	michael.chan@broadcom.com
Subject: [patch net-next v2 01/12] net: devlink: convert devlink_port_attrs bools to bits
Date: Mon,  1 Apr 2019 11:40:15 +0200	[thread overview]
Message-ID: <20190401094026.3676-2-jiri@resnulli.us> (raw)
In-Reply-To: <20190401094026.3676-1-jiri@resnulli.us>

From: Jiri Pirko <jiri@mellanox.com>

In order to save space in the struct, convert bools to bits.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
---
 include/net/devlink.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/net/devlink.h b/include/net/devlink.h
index 31d5cec4d06b..4a1e3452a4ce 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -41,10 +41,10 @@ struct devlink {
 };
 
 struct devlink_port_attrs {
-	bool set;
+	u8 set:1,
+	   split:1;
 	enum devlink_port_flavour flavour;
 	u32 port_number; /* same value as "split group" */
-	bool split;
 	u32 split_subport_number;
 };
 
-- 
2.17.2


  reply	other threads:[~2019-04-01  9:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01  9:40 [patch net-next v2 00/12] net: extend devlink port attrs with switch ID Jiri Pirko
2019-04-01  9:40 ` Jiri Pirko [this message]
2019-04-01 18:39   ` [patch net-next v2 01/12] net: devlink: convert devlink_port_attrs bools to bits Jakub Kicinski
2019-04-01  9:40 ` [patch net-next v2 02/12] net: devlink: extend port attrs for switch ID Jiri Pirko
2019-04-01  9:40 ` [patch net-next v2 03/12] net: devlink: introduce devlink_compat_switch_id_get() helper Jiri Pirko
2019-04-01  9:40 ` [patch net-next v2 04/12] mlxsw: Pass switch ID through devlink_port_attrs_set() Jiri Pirko
2019-04-01  9:40 ` [patch net-next v2 05/12] mlxsw: Remove ndo_get_port_parent_id implementation Jiri Pirko
2019-04-01  9:40 ` [patch net-next v2 06/12] bnxt: pass switch ID through devlink_port_attrs_set() Jiri Pirko
2019-04-01  9:40 ` [patch net-next v2 07/12] bnxt: remove ndo_get_port_parent_id implementation for physical ports Jiri Pirko
2019-04-01  9:40 ` [patch net-next v2 08/12] nfp: pass switch ID through devlink_port_attrs_set() Jiri Pirko
2019-04-01 18:40   ` Jakub Kicinski
2019-04-01  9:40 ` [patch net-next v2 09/12] nfp: remove ndo_get_port_parent_id implementation Jiri Pirko
2019-04-01 18:41   ` Jakub Kicinski
2019-04-01  9:40 ` [patch net-next v2 10/12] mlxsw: switch_ib: Pass valid HW id down to mlxsw_core_port_init() Jiri Pirko
2019-04-01  9:40 ` [patch net-next v2 11/12] dsa: pass switch ID through devlink_port_attrs_set() Jiri Pirko
2019-04-01  9:40 ` [patch net-next v2 12/12] net: devlink: add warning for ndo_get_port_parent_id set when not needed Jiri Pirko
2019-04-02  1:29 ` [patch net-next v2 00/12] net: extend devlink port attrs with switch ID David Miller
2019-04-02  1:33   ` David Miller
2019-04-02  6:19     ` Jiri Pirko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190401094026.3676-2-jiri@resnulli.us \
    --to=jiri@resnulli.us \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@mellanox.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=michael.chan@broadcom.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).