Commit 3da1110f authored by Varun Prakash's avatar Varun Prakash Committed by Nicholas Bellinger

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: default avatarVarun Prakash <varun@chelsio.com>
Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 9a584bf9
...@@ -872,7 +872,8 @@ cxgbit_offload_init(struct cxgbit_sock *csk, int iptype, __u8 *peer_ip, ...@@ -872,7 +872,8 @@ cxgbit_offload_init(struct cxgbit_sock *csk, int iptype, __u8 *peer_ip,
goto out; goto out;
csk->mtu = ndev->mtu; csk->mtu = ndev->mtu;
csk->tx_chan = cxgb4_port_chan(ndev); 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 / step = cdev->lldi.ntxq /
cdev->lldi.nchan; cdev->lldi.nchan;
csk->txq_idx = cxgb4_port_idx(ndev) * step; csk->txq_idx = cxgb4_port_idx(ndev) * step;
...@@ -907,7 +908,8 @@ cxgbit_offload_init(struct cxgbit_sock *csk, int iptype, __u8 *peer_ip, ...@@ -907,7 +908,8 @@ cxgbit_offload_init(struct cxgbit_sock *csk, int iptype, __u8 *peer_ip,
port_id = cxgb4_port_idx(ndev); port_id = cxgb4_port_idx(ndev);
csk->mtu = dst_mtu(dst); csk->mtu = dst_mtu(dst);
csk->tx_chan = cxgb4_port_chan(ndev); 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 / step = cdev->lldi.ntxq /
cdev->lldi.nports; cdev->lldi.nports;
csk->txq_idx = (port_id * step) + csk->txq_idx = (port_id * step) +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment