From: Bob Pearson <rpearsonhpe@gmail.com>
To: jgg@nvidia.com, zyjzyj2000@gmail.com, linux-rdma@vger.kernel.org,
jhack@hpe.com
Cc: Bob Pearson <rpearsonhpe@gmail.com>
Subject: [PATCH for-next v3 4/8] RDMA/rxe: Remove paylen parameter from rxe_init_packet
Date: Thu, 27 Jul 2023 14:28:28 -0500 [thread overview]
Message-ID: <20230727192831.65495-5-rpearsonhpe@gmail.com> (raw)
In-Reply-To: <20230727192831.65495-1-rpearsonhpe@gmail.com>
Remove paylen as a parameter to rxe_init_packet() since it
is already available in pkt.
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
drivers/infiniband/sw/rxe/rxe_loc.h | 2 +-
drivers/infiniband/sw/rxe/rxe_net.c | 7 ++++---
drivers/infiniband/sw/rxe/rxe_req.c | 2 +-
drivers/infiniband/sw/rxe/rxe_resp.c | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
index 666e06a82bc9..cf38f4dcff78 100644
--- a/drivers/infiniband/sw/rxe/rxe_loc.h
+++ b/drivers/infiniband/sw/rxe/rxe_loc.h
@@ -90,7 +90,7 @@ void rxe_mw_cleanup(struct rxe_pool_elem *elem);
/* rxe_net.c */
struct sk_buff *rxe_init_packet(struct rxe_dev *rxe, struct rxe_av *av,
- int paylen, struct rxe_pkt_info *pkt);
+ struct rxe_pkt_info *pkt);
int rxe_prepare(struct rxe_av *av, struct rxe_pkt_info *pkt,
struct sk_buff *skb);
int rxe_xmit_packet(struct rxe_qp *qp, struct rxe_pkt_info *pkt,
diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
index 0e447420a441..006c2d60f04d 100644
--- a/drivers/infiniband/sw/rxe/rxe_net.c
+++ b/drivers/infiniband/sw/rxe/rxe_net.c
@@ -511,7 +511,7 @@ int rxe_xmit_packet(struct rxe_qp *qp, struct rxe_pkt_info *pkt,
}
struct sk_buff *rxe_init_packet(struct rxe_dev *rxe, struct rxe_av *av,
- int paylen, struct rxe_pkt_info *pkt)
+ struct rxe_pkt_info *pkt)
{
unsigned int hdr_len;
struct sk_buff *skb = NULL;
@@ -525,7 +525,8 @@ struct sk_buff *rxe_init_packet(struct rxe_dev *rxe, struct rxe_av *av,
hdr_len = ETH_HLEN + sizeof(struct udphdr) +
sizeof(struct ipv6hdr);
- skb = alloc_skb(paylen + hdr_len + LL_RESERVED_SPACE(ndev), GFP_ATOMIC);
+ skb = alloc_skb(pkt->paylen + hdr_len + LL_RESERVED_SPACE(ndev),
+ GFP_ATOMIC);
if (unlikely(!skb))
goto out;
@@ -541,7 +542,7 @@ struct sk_buff *rxe_init_packet(struct rxe_dev *rxe, struct rxe_av *av,
pkt->rxe = rxe;
pkt->port_num = port_num;
- pkt->hdr = skb_put(skb, paylen);
+ pkt->hdr = skb_put(skb, pkt->paylen);
pkt->mask |= RXE_GRH_MASK;
out:
diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
index c92e561b8a0b..e444e1f91523 100644
--- a/drivers/infiniband/sw/rxe/rxe_req.c
+++ b/drivers/infiniband/sw/rxe/rxe_req.c
@@ -511,7 +511,7 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp,
pkt->pad + RXE_ICRC_SIZE;
/* init skb */
- skb = rxe_init_packet(rxe, av, pkt->paylen, pkt);
+ skb = rxe_init_packet(rxe, av, pkt);
if (unlikely(!skb))
return NULL;
diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index fc2f55329fa2..7e79d3e4d64e 100644
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -775,7 +775,7 @@ static struct sk_buff *prepare_ack_packet(struct rxe_qp *qp,
ack->paylen = rxe_opcode[opcode].length + payload +
ack->pad + RXE_ICRC_SIZE;
- skb = rxe_init_packet(rxe, &qp->pri_av, ack->paylen, ack);
+ skb = rxe_init_packet(rxe, &qp->pri_av, ack);
if (!skb)
return NULL;
--
2.39.2
next prev parent reply other threads:[~2023-07-27 19:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 19:28 [PATCH for-next v3 0/7] RDMA/rxe: Misc cleanups Bob Pearson
2023-07-27 19:28 ` [PATCH for-next v3 1/8] RDMA/rxe: Add pad size to struct rxe_pkt_info Bob Pearson
2023-07-27 19:28 ` [PATCH for-next v3 2/8] RDMA/rxe: Isolate code to fill request roce headers Bob Pearson
2023-07-27 19:28 ` [PATCH for-next v3 3/8] RDMA/rxe: Isolate request payload code in a subroutine Bob Pearson
2023-07-27 19:28 ` Bob Pearson [this message]
2023-07-27 19:28 ` [PATCH for-next v3 5/8] RDMA/rxe: Isolate code to build request packet Bob Pearson
2023-07-27 19:28 ` [PATCH for-next v3 6/8] RDMA/rxe: Put fake udp send code in a subroutine Bob Pearson
2023-07-27 19:28 ` [PATCH for-next v3 7/8] RDMA/rxe: Combine setting pkt info Bob Pearson
2023-07-27 19:28 ` [PATCH for-next v3 8/8] RDMA/rxe: Move next_opcode to rxe_opcode.c Bob Pearson
2023-08-09 19:20 ` [PATCH for-next v3 0/7] RDMA/rxe: Misc cleanups Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230727192831.65495-5-rpearsonhpe@gmail.com \
--to=rpearsonhpe@gmail.com \
--cc=jgg@nvidia.com \
--cc=jhack@hpe.com \
--cc=linux-rdma@vger.kernel.org \
--cc=zyjzyj2000@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox