diff options
author | Jarod Wilson <jarod@redhat.com> | 2019-06-07 10:59:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-09 13:36:01 -0700 |
commit | 5237ff79b23901a5326f8e986667976861370445 (patch) | |
tree | 8cab56d20ab1dc2de7a6725a7855f7e56e50958f | |
parent | f43b6530265a9cd14c39f00b0cc635405f02ae89 (diff) |
bonding: add slave_foo printk macros
Where possible, we generally want both the bond master and the relevant slave
information in message output. Standardize the format using new slave_*
printk macros.
Suggested-by: Joe Perches <joe@perches.com>
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Veaceslav Falico <vfalico@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: netdev@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/bonding.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/bonding.h b/include/net/bonding.h index b46d68acf701..676e7fae05a3 100644 --- a/include/net/bonding.h +++ b/include/net/bonding.h @@ -38,6 +38,15 @@ #define __long_aligned __attribute__((aligned((sizeof(long))))) #endif +#define slave_info(bond_dev, slave_dev, fmt, ...) \ + netdev_info(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__) +#define slave_warn(bond_dev, slave_dev, fmt, ...) \ + netdev_warn(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__) +#define slave_dbg(bond_dev, slave_dev, fmt, ...) \ + netdev_dbg(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__) +#define slave_err(bond_dev, slave_dev, fmt, ...) \ + netdev_err(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__) + #define BOND_MODE(bond) ((bond)->params.mode) /* slave list primitives */ |