netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v1] net/mlx4e: Don't redefine IB_MTU_XXX enum
@ 2025-06-17  8:06 Leon Romanovsky
  2025-06-17 11:37 ` Simon Horman
  2025-06-18 21:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Leon Romanovsky @ 2025-06-17  8:06 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Simon Horman
  Cc: Mark Zhang, netdev, Paolo Abeni, Patrisious Haddad, Tariq Toukan

From: Mark Zhang <markzhang@nvidia.com>

Rely on existing IB_MTU_XXX definitions which exist in ib_verbs.h.

Reviewed-by: Patrisious Haddad <phaddad@nvidia.com>
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
Changelog:
v1:
 * Change target from net to be net-next
 * Rewrote commit message
 * Removed Fixes line
v0: https://lore.kernel.org/all/aca9b2c482b4bea91e3750b15b2b00a33ee0265a.1750062150.git.leon@kernel.org
---
 drivers/net/ethernet/mellanox/mlx4/main.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index febeadfdd5a5..03d2fc7d9b09 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -49,6 +49,8 @@
 #include <linux/mlx4/device.h>
 #include <linux/mlx4/doorbell.h>
 
+#include <rdma/ib_verbs.h>
+
 #include "mlx4.h"
 #include "fw.h"
 #include "icm.h"
@@ -1246,14 +1248,6 @@ static ssize_t set_port_type(struct device *dev,
 	return err ? err : count;
 }
 
-enum ibta_mtu {
-	IB_MTU_256  = 1,
-	IB_MTU_512  = 2,
-	IB_MTU_1024 = 3,
-	IB_MTU_2048 = 4,
-	IB_MTU_4096 = 5
-};
-
 static inline int int_to_ibta_mtu(int mtu)
 {
 	switch (mtu) {
@@ -1266,7 +1260,7 @@ static inline int int_to_ibta_mtu(int mtu)
 	}
 }
 
-static inline int ibta_mtu_to_int(enum ibta_mtu mtu)
+static inline int ibta_mtu_to_int(enum ib_mtu mtu)
 {
 	switch (mtu) {
 	case IB_MTU_256:  return  256;
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v1] net/mlx4e: Don't redefine IB_MTU_XXX enum
  2025-06-17  8:06 [PATCH net-next v1] net/mlx4e: Don't redefine IB_MTU_XXX enum Leon Romanovsky
@ 2025-06-17 11:37 ` Simon Horman
  2025-06-18 21:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-06-17 11:37 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Mark Zhang, netdev, Paolo Abeni, Patrisious Haddad, Tariq Toukan

On Tue, Jun 17, 2025 at 11:06:30AM +0300, Leon Romanovsky wrote:
> From: Mark Zhang <markzhang@nvidia.com>
> 
> Rely on existing IB_MTU_XXX definitions which exist in ib_verbs.h.
> 
> Reviewed-by: Patrisious Haddad <phaddad@nvidia.com>
> Signed-off-by: Mark Zhang <markzhang@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> Changelog:
> v1:
>  * Change target from net to be net-next
>  * Rewrote commit message
>  * Removed Fixes line
> v0: https://lore.kernel.org/all/aca9b2c482b4bea91e3750b15b2b00a33ee0265a.1750062150.git.leon@kernel.org

Thanks for the update.

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v1] net/mlx4e: Don't redefine IB_MTU_XXX enum
  2025-06-17  8:06 [PATCH net-next v1] net/mlx4e: Don't redefine IB_MTU_XXX enum Leon Romanovsky
  2025-06-17 11:37 ` Simon Horman
@ 2025-06-18 21:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-18 21:20 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: andrew+netdev, davem, edumazet, kuba, horms, markzhang, netdev,
	pabeni, phaddad, tariqt

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 17 Jun 2025 11:06:30 +0300 you wrote:
> From: Mark Zhang <markzhang@nvidia.com>
> 
> Rely on existing IB_MTU_XXX definitions which exist in ib_verbs.h.
> 
> Reviewed-by: Patrisious Haddad <phaddad@nvidia.com>
> Signed-off-by: Mark Zhang <markzhang@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> 
> [...]

Here is the summary with links:
  - [net-next,v1] net/mlx4e: Don't redefine IB_MTU_XXX enum
    https://git.kernel.org/netdev/net-next/c/e0e3265acf5a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-18 21:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-17  8:06 [PATCH net-next v1] net/mlx4e: Don't redefine IB_MTU_XXX enum Leon Romanovsky
2025-06-17 11:37 ` Simon Horman
2025-06-18 21:20 ` patchwork-bot+netdevbpf

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).