summaryrefslogtreecommitdiffstats
path: root/net/hsr/hsr_device.c
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-02-21 11:28:12 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-21 13:16:16 -0500
commit0e0372816b9cbd22c82e3e7cd36e8e74c58ba641 (patch)
treede573b23b3502c3bc54abd34d10fb1d85e3b07e3 /net/hsr/hsr_device.c
parent8138affc4999bbe4ca5ed805b36f80b56354339e (diff)
downloadblackbird-obmc-linux-0e0372816b9cbd22c82e3e7cd36e8e74c58ba641.tar.gz
blackbird-obmc-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 'net/hsr/hsr_device.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud