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: ecb238f6a7 ("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>
This commit is contained in:
Bob Pearson 2021-06-17 23:57:43 -05:00 committed by Jason Gunthorpe
parent 3896bde92d
commit 2d3b2e4427

View File

@ -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: