* [PATCH net-next 0/2] mlx5 minor SRIOV fixes
@ 2015-12-08 21:56 Saeed Mahameed
2015-12-08 21:56 ` [PATCH net-next 1/2] net/mlx5: Fix query E-Switch capabilities Saeed Mahameed
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Saeed Mahameed @ 2015-12-08 21:56 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Or Gerlitz, saeedm, Saeed Mahameed
Hi Dave,
This short series fixes some minor issues in recently
introduced SRIOV code.
Saeed.
Saeed Mahameed (2):
net/mlx5: Fix query E-Switch capabilities
net/mlx5e: Assign random MAC address if needed
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++++
drivers/net/ethernet/mellanox/mlx5/core/fw.c | 2 +-
.../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 3 +++
3 files changed, 9 insertions(+), 1 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH net-next 1/2] net/mlx5: Fix query E-Switch capabilities
2015-12-08 21:56 [PATCH net-next 0/2] mlx5 minor SRIOV fixes Saeed Mahameed
@ 2015-12-08 21:56 ` Saeed Mahameed
2015-12-08 21:56 ` [PATCH net-next 2/2] net/mlx5e: Assign random MAC address if needed Saeed Mahameed
2015-12-09 2:41 ` [PATCH net-next 0/2] mlx5 minor SRIOV fixes David Miller
2 siblings, 0 replies; 6+ messages in thread
From: Saeed Mahameed @ 2015-12-08 21:56 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Or Gerlitz, saeedm, Saeed Mahameed
E-Switch capabilities should be queried only if E-Switch flow table
is supported and not only when vport group manager.
Fixes: d6666753c6e8 ("net/mlx5: E-Switch, Introduce HCA cap and E-Switch vport context")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/fw.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fw.c b/drivers/net/ethernet/mellanox/mlx5/core/fw.c
index 1c9f9a5..aa1ab47 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fw.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fw.c
@@ -173,7 +173,7 @@ int mlx5_query_hca_caps(struct mlx5_core_dev *dev)
return err;
}
- if (MLX5_CAP_GEN(dev, vport_group_manager)) {
+ if (MLX5_CAP_GEN(dev, eswitch_flow_table)) {
err = mlx5_core_get_caps(dev, MLX5_CAP_ESWITCH,
HCA_CAP_OPMOD_GET_CUR);
if (err)
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 2/2] net/mlx5e: Assign random MAC address if needed
2015-12-08 21:56 [PATCH net-next 0/2] mlx5 minor SRIOV fixes Saeed Mahameed
2015-12-08 21:56 ` [PATCH net-next 1/2] net/mlx5: Fix query E-Switch capabilities Saeed Mahameed
@ 2015-12-08 21:56 ` Saeed Mahameed
2015-12-09 2:41 ` [PATCH net-next 0/2] mlx5 minor SRIOV fixes David Miller
2 siblings, 0 replies; 6+ messages in thread
From: Saeed Mahameed @ 2015-12-08 21:56 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Or Gerlitz, saeedm, Saeed Mahameed
Under SRIOV there might be a case where VFs are loaded
without pre-assigned MAC address. In this case, the VF
will randomize its own MAC. This will address the case
of administrator not assigning MAC to the VF through
the PF OS APIs and keep udev happy.
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++++
.../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 3 +++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index d67058a..a20be56 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -2103,6 +2103,11 @@ static void mlx5e_set_netdev_dev_addr(struct net_device *netdev)
struct mlx5e_priv *priv = netdev_priv(netdev);
mlx5_query_nic_vport_mac_address(priv->mdev, 0, netdev->dev_addr);
+ if (is_zero_ether_addr(netdev->dev_addr) &&
+ !MLX5_CAP_GEN(priv->mdev, vport_group_manager)) {
+ eth_hw_addr_random(netdev);
+ mlx5_core_info(priv->mdev, "Assigned random MAC address %pM\n", netdev->dev_addr);
+ }
}
static void mlx5e_build_netdev(struct net_device *netdev)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
index bee7da8..ea6a137 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
@@ -65,6 +65,9 @@ do { \
(__dev)->priv.name, __func__, __LINE__, current->pid, \
##__VA_ARGS__)
+#define mlx5_core_info(__dev, format, ...) \
+ dev_info(&(__dev)->pdev->dev, format, ##__VA_ARGS__)
+
enum {
MLX5_CMD_DATA, /* print command payload only */
MLX5_CMD_TIME, /* print command execution time */
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 0/2] mlx5 minor SRIOV fixes
2015-12-08 21:56 [PATCH net-next 0/2] mlx5 minor SRIOV fixes Saeed Mahameed
2015-12-08 21:56 ` [PATCH net-next 1/2] net/mlx5: Fix query E-Switch capabilities Saeed Mahameed
2015-12-08 21:56 ` [PATCH net-next 2/2] net/mlx5e: Assign random MAC address if needed Saeed Mahameed
@ 2015-12-09 2:41 ` David Miller
2015-12-09 11:39 ` Saeed Mahameed
2 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2015-12-09 2:41 UTC (permalink / raw)
To: saeedm; +Cc: netdev, ogerlitz, saeedm
Don't do this, submitting two disconnected patch series for the same
driver (mlx5), for the same tree (net-next).
Just submit them all in one batch.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 0/2] mlx5 minor SRIOV fixes
2015-12-09 2:41 ` [PATCH net-next 0/2] mlx5 minor SRIOV fixes David Miller
@ 2015-12-09 11:39 ` Saeed Mahameed
2015-12-09 20:25 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Saeed Mahameed @ 2015-12-09 11:39 UTC (permalink / raw)
To: David Miller; +Cc: Saeed Mahameed, netdev, Or Gerlitz
On Wed, Dec 9, 2015 at 4:41 AM, David Miller <davem@davemloft.net> wrote:
>
> Don't do this, submitting two disconnected patch series for the same
> driver (mlx5), for the same tree (net-next).
>
for next time ? or you want me to re-submit those two patch sets ?
> Just submit them all in one batch.
In case of resubmission, What will be prefered re-submit with V1 on
the larger series, or resubmit with new topic ?
Sorry if I am asking trivial questions.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 0/2] mlx5 minor SRIOV fixes
2015-12-09 11:39 ` Saeed Mahameed
@ 2015-12-09 20:25 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-12-09 20:25 UTC (permalink / raw)
To: saeedm; +Cc: saeedm, netdev, ogerlitz
From: Saeed Mahameed <saeedm@dev.mellanox.co.il>
Date: Wed, 9 Dec 2015 13:39:32 +0200
> On Wed, Dec 9, 2015 at 4:41 AM, David Miller <davem@davemloft.net> wrote:
>>
>> Don't do this, submitting two disconnected patch series for the same
>> driver (mlx5), for the same tree (net-next).
>>
> for next time ? or you want me to re-submit those two patch sets ?
You must resubmit this current material.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-12-09 20:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-08 21:56 [PATCH net-next 0/2] mlx5 minor SRIOV fixes Saeed Mahameed
2015-12-08 21:56 ` [PATCH net-next 1/2] net/mlx5: Fix query E-Switch capabilities Saeed Mahameed
2015-12-08 21:56 ` [PATCH net-next 2/2] net/mlx5e: Assign random MAC address if needed Saeed Mahameed
2015-12-09 2:41 ` [PATCH net-next 0/2] mlx5 minor SRIOV fixes David Miller
2015-12-09 11:39 ` Saeed Mahameed
2015-12-09 20:25 ` David Miller
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).