RDMA/rxe: Remove useless pkt parameters
The pkt parameters in prepare_ack_packet(), send_ack() and send_atomic_ack() have become useless by the following commits. So remove them directly. Fixes: bf139b58af09 ("RDMA/rxe: Remove unused pkt->offset") Fixes: 3896bde92d03 ("RDMA/rxe: Fix extra copy in prepare_ack_packet") Link: https://lore.kernel.org/r/20220623131627.18903-1-yangx.jy@fujitsu.com Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
fd46ef3d82
commit
80a14dd4c3
@ -591,7 +591,6 @@ out:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct sk_buff *prepare_ack_packet(struct rxe_qp *qp,
|
static struct sk_buff *prepare_ack_packet(struct rxe_qp *qp,
|
||||||
struct rxe_pkt_info *pkt,
|
|
||||||
struct rxe_pkt_info *ack,
|
struct rxe_pkt_info *ack,
|
||||||
int opcode,
|
int opcode,
|
||||||
int payload,
|
int payload,
|
||||||
@ -771,7 +770,7 @@ static enum resp_states read_reply(struct rxe_qp *qp,
|
|||||||
|
|
||||||
payload = min_t(int, res->read.resid, mtu);
|
payload = min_t(int, res->read.resid, mtu);
|
||||||
|
|
||||||
skb = prepare_ack_packet(qp, req_pkt, &ack_pkt, opcode, payload,
|
skb = prepare_ack_packet(qp, &ack_pkt, opcode, payload,
|
||||||
res->cur_psn, AETH_ACK_UNLIMITED);
|
res->cur_psn, AETH_ACK_UNLIMITED);
|
||||||
if (!skb)
|
if (!skb)
|
||||||
return RESPST_ERR_RNR;
|
return RESPST_ERR_RNR;
|
||||||
@ -997,14 +996,13 @@ finish:
|
|||||||
return RESPST_CLEANUP;
|
return RESPST_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int send_ack(struct rxe_qp *qp, struct rxe_pkt_info *pkt,
|
static int send_ack(struct rxe_qp *qp, u8 syndrome, u32 psn)
|
||||||
u8 syndrome, u32 psn)
|
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
struct rxe_pkt_info ack_pkt;
|
struct rxe_pkt_info ack_pkt;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
|
|
||||||
skb = prepare_ack_packet(qp, pkt, &ack_pkt, IB_OPCODE_RC_ACKNOWLEDGE,
|
skb = prepare_ack_packet(qp, &ack_pkt, IB_OPCODE_RC_ACKNOWLEDGE,
|
||||||
0, psn, syndrome);
|
0, psn, syndrome);
|
||||||
if (!skb) {
|
if (!skb) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
@ -1019,17 +1017,15 @@ err1:
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int send_atomic_ack(struct rxe_qp *qp, struct rxe_pkt_info *pkt,
|
static int send_atomic_ack(struct rxe_qp *qp, u8 syndrome, u32 psn)
|
||||||
u8 syndrome)
|
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
struct rxe_pkt_info ack_pkt;
|
struct rxe_pkt_info ack_pkt;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
struct resp_res *res;
|
struct resp_res *res;
|
||||||
|
|
||||||
skb = prepare_ack_packet(qp, pkt, &ack_pkt,
|
skb = prepare_ack_packet(qp, &ack_pkt, IB_OPCODE_RC_ATOMIC_ACKNOWLEDGE,
|
||||||
IB_OPCODE_RC_ATOMIC_ACKNOWLEDGE, 0, pkt->psn,
|
0, psn, syndrome);
|
||||||
syndrome);
|
|
||||||
if (!skb) {
|
if (!skb) {
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto out;
|
goto out;
|
||||||
@ -1062,11 +1058,11 @@ static enum resp_states acknowledge(struct rxe_qp *qp,
|
|||||||
return RESPST_CLEANUP;
|
return RESPST_CLEANUP;
|
||||||
|
|
||||||
if (qp->resp.aeth_syndrome != AETH_ACK_UNLIMITED)
|
if (qp->resp.aeth_syndrome != AETH_ACK_UNLIMITED)
|
||||||
send_ack(qp, pkt, qp->resp.aeth_syndrome, pkt->psn);
|
send_ack(qp, qp->resp.aeth_syndrome, pkt->psn);
|
||||||
else if (pkt->mask & RXE_ATOMIC_MASK)
|
else if (pkt->mask & RXE_ATOMIC_MASK)
|
||||||
send_atomic_ack(qp, pkt, AETH_ACK_UNLIMITED);
|
send_atomic_ack(qp, AETH_ACK_UNLIMITED, pkt->psn);
|
||||||
else if (bth_ack(pkt))
|
else if (bth_ack(pkt))
|
||||||
send_ack(qp, pkt, AETH_ACK_UNLIMITED, pkt->psn);
|
send_ack(qp, AETH_ACK_UNLIMITED, pkt->psn);
|
||||||
|
|
||||||
return RESPST_CLEANUP;
|
return RESPST_CLEANUP;
|
||||||
}
|
}
|
||||||
@ -1119,7 +1115,7 @@ static enum resp_states duplicate_request(struct rxe_qp *qp,
|
|||||||
if (pkt->mask & RXE_SEND_MASK ||
|
if (pkt->mask & RXE_SEND_MASK ||
|
||||||
pkt->mask & RXE_WRITE_MASK) {
|
pkt->mask & RXE_WRITE_MASK) {
|
||||||
/* SEND. Ack again and cleanup. C9-105. */
|
/* SEND. Ack again and cleanup. C9-105. */
|
||||||
send_ack(qp, pkt, AETH_ACK_UNLIMITED, prev_psn);
|
send_ack(qp, AETH_ACK_UNLIMITED, prev_psn);
|
||||||
return RESPST_CLEANUP;
|
return RESPST_CLEANUP;
|
||||||
} else if (pkt->mask & RXE_READ_MASK) {
|
} else if (pkt->mask & RXE_READ_MASK) {
|
||||||
struct resp_res *res;
|
struct resp_res *res;
|
||||||
@ -1327,7 +1323,7 @@ int rxe_responder(void *arg)
|
|||||||
break;
|
break;
|
||||||
case RESPST_ERR_PSN_OUT_OF_SEQ:
|
case RESPST_ERR_PSN_OUT_OF_SEQ:
|
||||||
/* RC only - Class B. Drop packet. */
|
/* RC only - Class B. Drop packet. */
|
||||||
send_ack(qp, pkt, AETH_NAK_PSN_SEQ_ERROR, qp->resp.psn);
|
send_ack(qp, AETH_NAK_PSN_SEQ_ERROR, qp->resp.psn);
|
||||||
state = RESPST_CLEANUP;
|
state = RESPST_CLEANUP;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1349,7 +1345,7 @@ int rxe_responder(void *arg)
|
|||||||
if (qp_type(qp) == IB_QPT_RC) {
|
if (qp_type(qp) == IB_QPT_RC) {
|
||||||
rxe_counter_inc(rxe, RXE_CNT_SND_RNR);
|
rxe_counter_inc(rxe, RXE_CNT_SND_RNR);
|
||||||
/* RC - class B */
|
/* RC - class B */
|
||||||
send_ack(qp, pkt, AETH_RNR_NAK |
|
send_ack(qp, AETH_RNR_NAK |
|
||||||
(~AETH_TYPE_MASK &
|
(~AETH_TYPE_MASK &
|
||||||
qp->attr.min_rnr_timer),
|
qp->attr.min_rnr_timer),
|
||||||
pkt->psn);
|
pkt->psn);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user