summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Pearson <rpearsonhpe@gmail.com>2021-06-17 23:57:43 -0500
committerJason Gunthorpe <jgg@nvidia.com>2021-06-22 15:38:53 -0300
commit2d3b2e4427e2d74085bd2c17ffd737875871c983 (patch)
tree14cab631f905a61b39dfebd8138c48ce143d914e
parent3896bde92d036de4376b9b4dfa3753ea23659f30 (diff)
downloadlinux-2d3b2e4427e2d74085bd2c17ffd737875871c983.tar.bz2
RDMA/rxe: Fix redundant skb_put_zero
rxe_init_packet() in rxe_net.c calls skb_put_zero() to reserve space for the payload and zero it out. All these bytes are then re-written with RoCE headers and payload. Remove this useless extra copy. Fixes: ecb238f6a7f3 ("IB/cxgb4: use skb_put_zero()/__skb_put_zero") Link: https://lore.kernel.org/r/20210618045742.204195-7-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
-rw-r--r--drivers/infiniband/sw/rxe/rxe_net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
index c4350ce3b306..dec92928a1cd 100644
--- a/drivers/infiniband/sw/rxe/rxe_net.c
+++ b/drivers/infiniband/sw/rxe/rxe_net.c
@@ -468,7 +468,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_zero(skb, paylen);
+ pkt->hdr = skb_put(skb, paylen);
pkt->mask |= RXE_GRH_MASK;
out: