diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-02-21 11:28:12 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-21 19:16:16 +0100 |
commit | 0e0372816b9cbd22c82e3e7cd36e8e74c58ba641 (patch) | |
tree | de573b23b3502c3bc54abd34d10fb1d85e3b07e3 /drivers/hsi | |
parent | net: mvpp2: simplify MVPP2_PRS_RI_* definitions (diff) | |
download | linux-0e0372816b9cbd22c82e3e7cd36e8e74c58ba641.tar.xz linux-0e0372816b9cbd22c82e3e7cd36e8e74c58ba641.zip |
net: mvpp2: switch to build_skb() in the RX path
This commit adapts the mvpp2 RX path to use the build_skb() method. Not
only build_skb() is now the recommended mechanism, but it also
simplifies the addition of support for the PPv2.2 variant.
Indeed, without build_skb(), we have to keep track for each RX
descriptor of the physical address of the packet buffer, and the virtual
address of the SKB. However, in PPv2.2 running on 64 bits platform,
there is not enough space in the descriptor to store the virtual address
of the SKB. So having to take care only of the address of the packet
buffer, and building the SKB upon reception helps in supporting PPv2.2.
The implementation is fairly straightforward:
- mvpp2_skb_alloc() is renamed to mvpp2_buf_alloc() and no longer
allocates a SKB. Instead, it allocates a buffer using the new
mvpp2_frag_alloc() function, with enough space for the data and SKB.
- The initialization of the RX buffers in mvpp2_bm_bufs_add() as well
as the refill of the RX buffers in mvpp2_rx_refill() is adjusted
accordingly.
- Finally, the mvpp2_rx() is modified to use build_skb().
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/hsi')
0 files changed, 0 insertions, 0 deletions