Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2] net/mlx5e: Make use of mlx5_core_warn()
@ 2021-08-09 12:19 Cai Huoqing
2021-08-09 12:28 ` Leon Romanovsky
2021-08-09 20:39 ` Saeed Mahameed
0 siblings, 2 replies; 5+ messages in thread
From: Cai Huoqing @ 2021-08-09 12:19 UTC (permalink / raw)
To: saeedm, leon; +Cc: netdev, linux-rdma, Cai Huoqing
to replace printk(KERN_WARNING ...) with mlx5_core_warn() kindly
if we use mlx5_core_warn(), the prefix "mlx5:" not needed
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index e5c4344a114e..304cca0f54d3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -2702,7 +2702,8 @@ static int offload_pedit_fields(struct mlx5e_priv *priv,
if (s_mask && a_mask) {
NL_SET_ERR_MSG_MOD(extack,
"can't set and add to the same HW field");
- printk(KERN_WARNING "mlx5: can't set and add to the same HW field (%x)\n", f->field);
+ mlx5_core_warn(priv->mdev,
+ "can't set and add to the same HW field (%x)\n", f->field);
return -EOPNOTSUPP;
}
@@ -2741,8 +2742,9 @@ static int offload_pedit_fields(struct mlx5e_priv *priv,
if (first < next_z && next_z < last) {
NL_SET_ERR_MSG_MOD(extack,
"rewrite of few sub-fields isn't supported");
- printk(KERN_WARNING "mlx5: rewrite of few sub-fields (mask %lx) isn't offloaded\n",
- mask);
+ mlx5_core_warn(priv->mdev,
+ "rewrite of few sub-fields (mask %lx) isn't offloaded\n",
+ mask);
return -EOPNOTSUPP;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net/mlx5e: Make use of mlx5_core_warn()
2021-08-09 12:19 [PATCH v2] net/mlx5e: Make use of mlx5_core_warn() Cai Huoqing
@ 2021-08-09 12:28 ` Leon Romanovsky
2021-08-09 20:39 ` Saeed Mahameed
1 sibling, 0 replies; 5+ messages in thread
From: Leon Romanovsky @ 2021-08-09 12:28 UTC (permalink / raw)
To: Cai Huoqing; +Cc: saeedm, netdev, linux-rdma
On Mon, Aug 09, 2021 at 08:19:31PM +0800, Cai Huoqing wrote:
> to replace printk(KERN_WARNING ...) with mlx5_core_warn() kindly
> if we use mlx5_core_warn(), the prefix "mlx5:" not needed
>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net/mlx5e: Make use of mlx5_core_warn()
2021-08-09 12:19 [PATCH v2] net/mlx5e: Make use of mlx5_core_warn() Cai Huoqing
2021-08-09 12:28 ` Leon Romanovsky
@ 2021-08-09 20:39 ` Saeed Mahameed
2021-08-10 6:58 ` Leon Romanovsky
1 sibling, 1 reply; 5+ messages in thread
From: Saeed Mahameed @ 2021-08-09 20:39 UTC (permalink / raw)
To: caihuoqing, leon; +Cc: netdev, linux-rdma
On Mon, 2021-08-09 at 20:19 +0800, Cai Huoqing wrote:
> to replace printk(KERN_WARNING ...) with mlx5_core_warn() kindly
> if we use mlx5_core_warn(), the prefix "mlx5:" not needed
in mlx5e it is netdev stack so netdev_warn(priv->netdev, "foo bar");
please.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net/mlx5e: Make use of mlx5_core_warn()
2021-08-09 20:39 ` Saeed Mahameed
@ 2021-08-10 6:58 ` Leon Romanovsky
2021-08-10 8:22 ` Saeed Mahameed
0 siblings, 1 reply; 5+ messages in thread
From: Leon Romanovsky @ 2021-08-10 6:58 UTC (permalink / raw)
To: Saeed Mahameed; +Cc: caihuoqing, netdev, linux-rdma
On Mon, Aug 09, 2021 at 08:39:10PM +0000, Saeed Mahameed wrote:
> On Mon, 2021-08-09 at 20:19 +0800, Cai Huoqing wrote:
> > to replace printk(KERN_WARNING ...) with mlx5_core_warn() kindly
> > if we use mlx5_core_warn(), the prefix "mlx5:" not needed
>
> in mlx5e it is netdev stack so netdev_warn(priv->netdev, "foo bar");
Saeed,
That file is full of mlx5_core_* prints, even in the same function where
Cai is changing, you will find mlx5_core_warn().
Thanks
> please.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net/mlx5e: Make use of mlx5_core_warn()
2021-08-10 6:58 ` Leon Romanovsky
@ 2021-08-10 8:22 ` Saeed Mahameed
0 siblings, 0 replies; 5+ messages in thread
From: Saeed Mahameed @ 2021-08-10 8:22 UTC (permalink / raw)
To: leon; +Cc: netdev, caihuoqing, linux-rdma
On Tue, 2021-08-10 at 09:58 +0300, Leon Romanovsky wrote:
> On Mon, Aug 09, 2021 at 08:39:10PM +0000, Saeed Mahameed wrote:
> > On Mon, 2021-08-09 at 20:19 +0800, Cai Huoqing wrote:
> > > to replace printk(KERN_WARNING ...) with mlx5_core_warn() kindly
> > > if we use mlx5_core_warn(), the prefix "mlx5:" not needed
> >
> > in mlx5e it is netdev stack so netdev_warn(priv->netdev, "foo bar");
>
> Saeed,
>
> That file is full of mlx5_core_* prints, even in the same function
> where
> Cai is changing, you will find mlx5_core_warn().
>
$ git grep -E "mlx5_core_(warn|info|err)"
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | wc -l
4
$ git grep -E "netdev_(warn|info|err)"
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | wc -l
24
4 vs 24, a big win for netdev ;-)
4 is not full. Many of mlx5 files has some leftovers historical code,
doesn't mean we need to keep the old habits ..
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-10 8:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09 12:19 [PATCH v2] net/mlx5e: Make use of mlx5_core_warn() Cai Huoqing
2021-08-09 12:28 ` Leon Romanovsky
2021-08-09 20:39 ` Saeed Mahameed
2021-08-10 6:58 ` Leon Romanovsky
2021-08-10 8:22 ` Saeed Mahameed
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).