From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, idosch@mellanox.com, eladr@mellanox.com,
yotamg@mellanox.com, ogerlitz@mellanox.com, sagir@mellanox.com
Subject: [patch net-next 03/12] mlxsw: spectrum: move "bridged" bool to u8 flags
Date: Wed, 28 Oct 2015 10:16:56 +0100 [thread overview]
Message-ID: <1446023825-7162-4-git-send-email-jiri@resnulli.us> (raw)
In-Reply-To: <1446023825-7162-1-git-send-email-jiri@resnulli.us>
From: Jiri Pirko <jiri@mellanox.com>
It is a flag anyway, so move it to existing u8 flag and don't waste mem.
Fix the flags to be in single u8 on the way.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++--
drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 6e9906d..e30b2da 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -1899,12 +1899,12 @@ static int mlxsw_sp_netdevice_event(struct notifier_block *unused,
if (err)
netdev_err(dev, "Failed to join bridge\n");
mlxsw_sp_master_bridge_inc(mlxsw_sp, upper_dev);
- mlxsw_sp_port->bridged = true;
+ mlxsw_sp_port->bridged = 1;
} else {
err = mlxsw_sp_port_bridge_leave(mlxsw_sp_port);
if (err)
netdev_err(dev, "Failed to leave bridge\n");
- mlxsw_sp_port->bridged = false;
+ mlxsw_sp_port->bridged = 0;
mlxsw_sp_master_bridge_dec(mlxsw_sp, upper_dev);
}
}
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index fc00749..b4d8393 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -84,10 +84,10 @@ struct mlxsw_sp_port {
struct mlxsw_sp *mlxsw_sp;
u8 local_port;
u8 stp_state;
- u8 learning:1;
- u8 learning_sync:1;
+ u8 learning:1,
+ learning_sync:1,
+ bridged:1;
u16 pvid;
- bool bridged;
/* 802.1Q bridge VLANs */
unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
/* VLAN interfaces */
--
1.9.3
next prev parent reply other threads:[~2015-10-28 9:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-28 9:16 [patch net-next 00/12] mlxsw: driver update Jiri Pirko
2015-10-28 9:16 ` [patch net-next 01/12] switchdev: Add support for flood control Jiri Pirko
2015-10-28 9:16 ` [patch net-next 02/12] switchdev: Make flood to CPU optional Jiri Pirko
2015-10-28 9:16 ` Jiri Pirko [this message]
2015-10-28 9:16 ` [patch net-next 04/12] mlxsw: spectrum: Add support for VLAN ranges in flooding configuration Jiri Pirko
2015-10-28 9:16 ` [patch net-next 05/12] mlxsw: spectrum: Add support for flood control Jiri Pirko
2015-10-28 9:16 ` [patch net-next 06/12] mlxsw: reg: Fix description for reg_sfd_uc_sub_port Jiri Pirko
2015-10-28 9:17 ` [patch net-next 07/12] mlxsw: reg: Fix desription typos of couple of SFN items Jiri Pirko
2015-10-28 9:17 ` [patch net-next 08/12] mlxsw: reg: Avoid unnecessary line wrap for mlxsw_reg_sfd_uc_unpack Jiri Pirko
2015-10-28 9:17 ` [patch net-next 09/12] mlxsw: spectrum: Fix ageing time value Jiri Pirko
2015-10-28 9:17 ` [patch net-next 10/12] mlxsw: Put constant on the right side of comparisons Jiri Pirko
2015-10-28 9:17 ` [patch net-next 11/12] mlxsw: Put braces on all arms of branch statement Jiri Pirko
2015-10-28 9:17 ` [patch net-next 12/12] mlxsw: spectrum: Make mlxsw_sp_port_switchdev_ops static Jiri Pirko
2015-10-30 3:27 ` [patch net-next 00/12] mlxsw: driver update David Miller
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=1446023825-7162-4-git-send-email-jiri@resnulli.us \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=eladr@mellanox.com \
--cc=idosch@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=sagir@mellanox.com \
--cc=yotamg@mellanox.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).