diff options
author | Shang XiaoJing <shangxiaojing@huawei.com> | 2022-09-27 17:18:35 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-09-29 11:46:42 +0300 |
commit | d49e265b66d9cf1537e93c44e189110f87cb656d (patch) | |
tree | fe67526f635205d0889a89ed04d7e74871ec9a48 /drivers/net/ethernet/netronome/nfp | |
parent | 01c617d73f840c097d1db4c367c6b4044edfc827 (diff) | |
download | linux-d49e265b66d9cf1537e93c44e189110f87cb656d.tar.xz |
nfp: Use skb_put_data() instead of skb_put/memcpy pair
Use skb_put_data() instead of skb_put() and memcpy(), which is clear.
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Link: https://lore.kernel.org/r/20220927141835.19221-1-shangxiaojing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfd3/xsk.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |