RDMA/cxgb4: Derive smac_idx from port viid
Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
1973e8b8ed
commit
2c5934bfc5
|
@ -1373,7 +1373,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)
|
||||||
pdev, 0);
|
pdev, 0);
|
||||||
mtu = pdev->mtu;
|
mtu = pdev->mtu;
|
||||||
tx_chan = cxgb4_port_chan(pdev);
|
tx_chan = cxgb4_port_chan(pdev);
|
||||||
smac_idx = tx_chan << 1;
|
smac_idx = (cxgb4_port_viid(pdev) & 0x7F) << 1;
|
||||||
step = dev->rdev.lldi.ntxq / dev->rdev.lldi.nchan;
|
step = dev->rdev.lldi.ntxq / dev->rdev.lldi.nchan;
|
||||||
txq_idx = cxgb4_port_idx(pdev) * step;
|
txq_idx = cxgb4_port_idx(pdev) * step;
|
||||||
step = dev->rdev.lldi.nrxq / dev->rdev.lldi.nchan;
|
step = dev->rdev.lldi.nrxq / dev->rdev.lldi.nchan;
|
||||||
|
@ -1384,7 +1384,7 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)
|
||||||
dst->neighbour->dev, 0);
|
dst->neighbour->dev, 0);
|
||||||
mtu = dst_mtu(dst);
|
mtu = dst_mtu(dst);
|
||||||
tx_chan = cxgb4_port_chan(dst->neighbour->dev);
|
tx_chan = cxgb4_port_chan(dst->neighbour->dev);
|
||||||
smac_idx = tx_chan << 1;
|
smac_idx = (cxgb4_port_viid(dst->neighbour->dev) & 0x7F) << 1;
|
||||||
step = dev->rdev.lldi.ntxq / dev->rdev.lldi.nchan;
|
step = dev->rdev.lldi.ntxq / dev->rdev.lldi.nchan;
|
||||||
txq_idx = cxgb4_port_idx(dst->neighbour->dev) * step;
|
txq_idx = cxgb4_port_idx(dst->neighbour->dev) * step;
|
||||||
step = dev->rdev.lldi.nrxq / dev->rdev.lldi.nchan;
|
step = dev->rdev.lldi.nrxq / dev->rdev.lldi.nchan;
|
||||||
|
@ -1951,7 +1951,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
||||||
pdev, 0);
|
pdev, 0);
|
||||||
ep->mtu = pdev->mtu;
|
ep->mtu = pdev->mtu;
|
||||||
ep->tx_chan = cxgb4_port_chan(pdev);
|
ep->tx_chan = cxgb4_port_chan(pdev);
|
||||||
ep->smac_idx = ep->tx_chan << 1;
|
ep->smac_idx = (cxgb4_port_viid(pdev) & 0x7F) << 1;
|
||||||
step = ep->com.dev->rdev.lldi.ntxq /
|
step = ep->com.dev->rdev.lldi.ntxq /
|
||||||
ep->com.dev->rdev.lldi.nchan;
|
ep->com.dev->rdev.lldi.nchan;
|
||||||
ep->txq_idx = cxgb4_port_idx(pdev) * step;
|
ep->txq_idx = cxgb4_port_idx(pdev) * step;
|
||||||
|
@ -1966,7 +1966,8 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
||||||
ep->dst->neighbour->dev, 0);
|
ep->dst->neighbour->dev, 0);
|
||||||
ep->mtu = dst_mtu(ep->dst);
|
ep->mtu = dst_mtu(ep->dst);
|
||||||
ep->tx_chan = cxgb4_port_chan(ep->dst->neighbour->dev);
|
ep->tx_chan = cxgb4_port_chan(ep->dst->neighbour->dev);
|
||||||
ep->smac_idx = ep->tx_chan << 1;
|
ep->smac_idx = (cxgb4_port_viid(ep->dst->neighbour->dev) &
|
||||||
|
0x7F) << 1;
|
||||||
step = ep->com.dev->rdev.lldi.ntxq /
|
step = ep->com.dev->rdev.lldi.ntxq /
|
||||||
ep->com.dev->rdev.lldi.nchan;
|
ep->com.dev->rdev.lldi.nchan;
|
||||||
ep->txq_idx = cxgb4_port_idx(ep->dst->neighbour->dev) * step;
|
ep->txq_idx = cxgb4_port_idx(ep->dst->neighbour->dev) * step;
|
||||||
|
|
Loading…
Reference in a new issue