diff options
author | Rony Efraim <ronye@mellanox.com> | 2013-04-25 09:22:29 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-27 07:29:14 +0400 |
commit | e6b6a2316379feebebacec0979b3ebc5743e7502 (patch) | |
tree | 2b9c6722ba3191afad8e7d3eb9c937202ed53cee /drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | |
parent | 3f7fb021d081c8aaac1d0cf69a288d21625e872e (diff) | |
download | linux-e6b6a2316379feebebacec0979b3ebc5743e7502.tar.xz |
net/mlx4: Add VF MAC spoof checking support
Add ndo_set_vf_spoofchk support
Signed-off-by: Rony Efraim <ronye@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/resource_tracker.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c index 5083d4babfe3..e12e0d2e0ee0 100644 --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c @@ -383,6 +383,14 @@ static int update_vport_qp_param(struct mlx4_dev *dev, vp_oper->vlan_idx, (int)(qpc->pri_path.feup), (int)(qpc->pri_path.fl)); } + if (vp_oper->state.spoofchk) { + qpc->pri_path.feup |= 1 << 5; /* set fsm bit */; + qpc->pri_path.grh_mylmc = (0x80 & qpc->pri_path.grh_mylmc) + vp_oper->mac_idx; + mlx4_dbg(dev, "spoof qp %d port %d feup 0x%x, myLmc 0x%x mindx %d\n", + be32_to_cpu(qpc->local_qpn) & 0xffffff, port, + (int)qpc->pri_path.feup, (int)qpc->pri_path.grh_mylmc, + vp_oper->mac_idx); + } return 0; } |