diff options
author | David S. Miller <davem@davemloft.net> | 2017-08-07 10:42:09 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-07 10:42:09 -0700 |
commit | fde6af4729b005dc9dc936b0ed9f1b27b5b2d0f4 (patch) | |
tree | fb52e170a7b2130b8a5266ac665d4314447fef95 /drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | |
parent | Merge branch 'net-sched-summer-cleanup-part-2-ndo_setup_tc' (diff) | |
parent | net/mlx5: Increase the maximum flow counters supported (diff) | |
download | linux-dev-fde6af4729b005dc9dc936b0ed9f1b27b5b2d0f4.tar.xz linux-dev-fde6af4729b005dc9dc936b0ed9f1b27b5b2d0f4.zip |
Merge tag 'mlx5-shared-2017-08-07' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux
Saeed Mahameed says:
====================
mlx5-shared-2017-08-07
This series includes some mlx5 updates for both net-next and rdma trees.
From Saeed,
Core driver updates to allow selectively building the driver with
or without some large driver components, such as
- E-Switch (Ethernet SRIOV support).
- Multi-Physical Function Switch (MPFs) support.
For that we split E-Switch and MPFs functionalities into separate files.
From Erez,
Delay mlx5_core events when mlx5 interfaces, namely mlx5_ib, registration
is taking place and until it completes.
From Rabie,
Increase the maximum supported flow counters.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_rep.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c index 3df994d1e173..f3c494a4ecdf 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c @@ -1104,3 +1104,16 @@ void mlx5e_unregister_vport_reps(struct mlx5e_priv *priv) mlx5e_rep_unregister_vf_vports(priv); /* VFs vports */ mlx5_eswitch_unregister_vport_rep(esw, 0); /* UPLINK PF*/ } + +void *mlx5e_alloc_nic_rep_priv(struct mlx5_core_dev *mdev) +{ + struct mlx5_eswitch *esw = mdev->priv.eswitch; + struct mlx5e_rep_priv *rpriv; + + rpriv = kzalloc(sizeof(*rpriv), GFP_KERNEL); + if (!rpriv) + return NULL; + + rpriv->rep = &esw->offloads.vport_reps[0]; + return rpriv; +} |