target/cxgbit: use cxgb4_tp_smt_idx() to get smt idx

cxgb4_tp_smt_idx() returns smt idx for T4,T5,T6 adapters.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
Varun Prakash 2017-01-13 20:53:22 +05:30 committed by Nicholas Bellinger
parent 9a584bf9bf
commit 3da1110fd1
1 changed files with 4 additions and 2 deletions

View File

@ -872,7 +872,8 @@ cxgbit_offload_init(struct cxgbit_sock *csk, int iptype, __u8 *peer_ip,
goto out;
csk->mtu = ndev->mtu;
csk->tx_chan = cxgb4_port_chan(ndev);
csk->smac_idx = (cxgb4_port_viid(ndev) & 0x7F) << 1;
csk->smac_idx = cxgb4_tp_smt_idx(cdev->lldi.adapter_type,
cxgb4_port_viid(ndev));
step = cdev->lldi.ntxq /
cdev->lldi.nchan;
csk->txq_idx = cxgb4_port_idx(ndev) * step;
@ -907,7 +908,8 @@ cxgbit_offload_init(struct cxgbit_sock *csk, int iptype, __u8 *peer_ip,
port_id = cxgb4_port_idx(ndev);
csk->mtu = dst_mtu(dst);
csk->tx_chan = cxgb4_port_chan(ndev);
csk->smac_idx = (cxgb4_port_viid(ndev) & 0x7F) << 1;
csk->smac_idx = cxgb4_tp_smt_idx(cdev->lldi.adapter_type,
cxgb4_port_viid(ndev));
step = cdev->lldi.ntxq /
cdev->lldi.nports;
csk->txq_idx = (port_id * step) +