From: Lorenzo Bianconi <lorenzo@kernel.org> Date: 2021-06-09 12:01:41
As already done for mvneta and mvpp2, enable skb recycling for ti
ethernet drivers
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
This patch has just compile-tested
---
drivers/net/ethernet/ti/cpsw.c | 4 ++--
drivers/net/ethernet/ti/cpsw_new.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
@@ -430,8 +430,8 @@ static void cpsw_rx_handler(void *token, int len, int status)cpts_rx_timestamp(cpsw->cpts,skb);skb->protocol=eth_type_trans(skb,ndev);-/* unmap page as no netstack skb page recycling */-page_pool_release_page(pool,page);+/* mark skb for recycling */+skb_mark_for_recycle(skb,page,pool);netif_receive_skb(skb);ndev->stats.rx_bytes+=len;
@@ -373,8 +373,8 @@ static void cpsw_rx_handler(void *token, int len, int status)cpts_rx_timestamp(cpsw->cpts,skb);skb->protocol=eth_type_trans(skb,ndev);-/* unmap page as no netstack skb page recycling */-page_pool_release_page(pool,page);+/* mark skb for recycling */+skb_mark_for_recycle(skb,page,pool);netif_receive_skb(skb);ndev->stats.rx_bytes+=len;
On Wed, Jun 9, 2021 at 5:03 PM Grygorii Strashko
[off-list ref] wrote:
hi
On 09/06/2021 15:20, Matteo Croce wrote:
quoted
On Wed, Jun 9, 2021 at 2:01 PM Lorenzo Bianconi [off-list ref] wrote:
quoted
As already done for mvneta and mvpp2, enable skb recycling for ti
ethernet drivers
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Looks good! If someone with the HW could provide a with and without
the patch, that would be nice!
What test would you recommend to run?
--
Best regards,
grygorii
Hi Grygorii,
A test which benefits most from this kind of change is one in which
the frames are freed early.
One option would be to use mausezahn which by default sends frames
with an invalid ethertype, that are dropped very early from the stack
(I think in __netif_receive_skb_core() or near there).
Then, on the device I just watch the device statistics to count
packets per second:
mausezahn eth0 -c 0 -b $board_mac_address
This test should be precise enough for a gigabit link, on faster links
I usually use a DPDK or AF_XDP based one.
Regards,
--
per aspera ad upstream
On Wed, 9 Jun 2021 17:43:57 +0200
Matteo Croce [off-list ref] wrote:
On Wed, Jun 9, 2021 at 5:03 PM Grygorii Strashko
[off-list ref] wrote:
quoted
On 09/06/2021 15:20, Matteo Croce wrote:
quoted
On Wed, Jun 9, 2021 at 2:01 PM Lorenzo Bianconi [off-list ref] wrote:
quoted
As already done for mvneta and mvpp2, enable skb recycling for ti
ethernet drivers
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Looks good! If someone with the HW could provide a with and without
the patch, that would be nice!
What test would you recommend to run?
[...]
A test which benefits most from this kind of change is one in which
the frames are freed early.
I would also recommend running an XDP_PASS program, and then running
something that let the packets travel as deep as possible into netstack.
Not to test performance, but to make sure we didn't break something!
I've hacked up bnxt driver (it's not as straight forward as this driver
to convert) and is running some TCP tests. Not problems so-far :-0
I wanted to ask if someone knows howto setup the zero-copy TCP stuff
that google did? (but is that TX only?)
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
From: Eric Dumazet <hidden> Date: 2021-06-09 16:58:54
On 6/9/21 5:55 PM, Jesper Dangaard Brouer wrote:
On Wed, 9 Jun 2021 17:43:57 +0200
Matteo Croce [off-list ref] wrote:
quoted
On Wed, Jun 9, 2021 at 5:03 PM Grygorii Strashko
[off-list ref] wrote:
quoted
On 09/06/2021 15:20, Matteo Croce wrote:
quoted
On Wed, Jun 9, 2021 at 2:01 PM Lorenzo Bianconi [off-list ref] wrote:
quoted
As already done for mvneta and mvpp2, enable skb recycling for ti
ethernet drivers
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Looks good! If someone with the HW could provide a with and without
the patch, that would be nice!
What test would you recommend to run?
[...]
quoted
A test which benefits most from this kind of change is one in which
the frames are freed early.
I would also recommend running an XDP_PASS program, and then running
something that let the packets travel as deep as possible into netstack.
Not to test performance, but to make sure we didn't break something!
I've hacked up bnxt driver (it's not as straight forward as this driver
to convert) and is running some TCP tests. Not problems so-far :-0
I wanted to ask if someone knows howto setup the zero-copy TCP stuff
that google did? (but is that TX only?)