All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhu Yanjun <zyjzyj2000@gmail.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH for-next 6/6] RDMA/rxe: Fix redundant skb_put_zero
Date: Fri, 18 Jun 2021 16:02:13 +0800	[thread overview]
Message-ID: <CAD=hENfOFHUrSFws0ipYmrcQ803uFNmK9rPNLt-hPWpXndsLSQ@mail.gmail.com> (raw)
In-Reply-To: <20210618045742.204195-7-rpearsonhpe@gmail.com>

On Fri, Jun 18, 2021 at 1:00 PM Bob Pearson <rpearsonhpe@gmail.com> wrote:
>
> 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.

The paylen seems to be a variable, that is, the length of pkt->hdr is not fixed.

Can you confirm that all the pkt->hdr are re-writtenwith RoCE headers
and payload?

Zhu Yanjun

>
> Fixes: ecb238f6a7f3 ("IB/cxgb4: use skb_put_zero()/__skb_put_zero")
> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_net.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
> index 178a66a45312..6605ee777667 100644
> --- a/drivers/infiniband/sw/rxe/rxe_net.c
> +++ b/drivers/infiniband/sw/rxe/rxe_net.c
> @@ -470,7 +470,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:
> --
> 2.30.2
>

  reply	other threads:[~2021-06-18  8:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18  4:57 [PATCH for-next 0/6] Fix extra/redundant copies Bob Pearson
2021-06-18  4:57 ` [PATCH for-next 1/6] RDMA/rxe: Fix useless copy in send_atomic_ack Bob Pearson
2021-06-18  4:57 ` [PATCH for-next 2/6] RDMA/rxe: Fix redundant call to ip_send_check Bob Pearson
2021-06-18  4:57 ` [PATCH for-next 3/6] RDMA/rxe: Fix extra copies in build_rdma_network_hdr Bob Pearson
2021-06-18  4:57 ` [PATCH for-next 4/6] RDMA/rxe: Fix over copying in get_srq_wqe Bob Pearson
2021-06-18  4:57 ` [PATCH for-next 5/6] RDMA/rxe: Fix extra copy in prepare_ack_packet Bob Pearson
2021-06-18  4:57 ` [PATCH for-next 6/6] RDMA/rxe: Fix redundant skb_put_zero Bob Pearson
2021-06-18  8:02   ` Zhu Yanjun [this message]
2021-06-18 15:32     ` Bob Pearson
2021-06-20 14:07       ` Zhu Yanjun
2021-06-20 20:21         ` Bob Pearson
2021-06-21  2:58           ` Zhu Yanjun
2021-06-22 18:40 ` [PATCH for-next 0/6] Fix extra/redundant copies 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='CAD=hENfOFHUrSFws0ipYmrcQ803uFNmK9rPNLt-hPWpXndsLSQ@mail.gmail.com' \
    --to=zyjzyj2000@gmail.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearsonhpe@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.