提交 3da1110f 编写于 作者: V Varun Prakash 提交者: 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: NVarun Prakash <varun@chelsio.com>
Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 9a584bf9
......@@ -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) +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册