From: "Niklas Söderlund" <niklas.soderlund@corigine.com>
To: Shang XiaoJing <shangxiaojing@huawei.com>
Cc: simon.horman@corigine.com, kuba@kernel.org, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com, ast@kernel.org,
daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com,
oss-drivers@corigine.com, netdev@vger.kernel.org
Subject: Re: [PATCH -next v2] nfp: Use skb_put_data() instead of skb_put/memcpy pair
Date: Wed, 28 Sep 2022 10:20:47 +0200 [thread overview]
Message-ID: <YzQD35IZUA3LUJZX@oden.dyn.berto.se> (raw)
In-Reply-To: <20220927141835.19221-1-shangxiaojing@huawei.com>
Hi Shang,
Thanks for your work.
On 2022-09-27 22:18:35 +0800, Shang XiaoJing wrote:
> Use skb_put_data() instead of skb_put() and memcpy(), which is clear.
>
> Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
> ---
> changes in v2:
> - no change
> ---
> drivers/net/ethernet/netronome/nfp/nfd3/xsk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/netronome/nfp/nfd3/xsk.c b/drivers/net/ethernet/netronome/nfp/nfd3/xsk.c
> index 65e243168765..5d9db8c2a5b4 100644
> --- a/drivers/net/ethernet/netronome/nfp/nfd3/xsk.c
> +++ b/drivers/net/ethernet/netronome/nfp/nfd3/xsk.c
> @@ -84,7 +84,7 @@ static void nfp_nfd3_xsk_rx_skb(struct nfp_net_rx_ring *rx_ring,
> nfp_net_xsk_rx_drop(r_vec, xrxbuf);
> return;
> }
> - memcpy(skb_put(skb, pkt_len), xrxbuf->xdp->data, pkt_len);
> + skb_put_data(skb, xrxbuf->xdp->data, pkt_len);
>
> skb->mark = meta->mark;
> skb_set_hash(skb, meta->hash, meta->hash_type);
> --
> 2.17.1
>
--
Kind Regards,
Niklas Söderlund
next prev parent reply other threads:[~2022-09-28 8:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 14:18 [PATCH -next v2] nfp: Use skb_put_data() instead of skb_put/memcpy pair Shang XiaoJing
2022-09-28 1:05 ` shangxiaojing
2022-09-28 8:20 ` Niklas Söderlund [this message]
2022-09-29 9:00 ` patchwork-bot+netdevbpf
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=YzQD35IZUA3LUJZX@oden.dyn.berto.se \
--to=niklas.soderlund@corigine.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@corigine.com \
--cc=pabeni@redhat.com \
--cc=shangxiaojing@huawei.com \
--cc=simon.horman@corigine.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;
as well as URLs for NNTP newsgroup(s).