Re: [PATCH 0/3] Receive Side Coalescing for macb driver

2018-04-17 Thread David Miller
From: Rafal Ozieblo 
Date: Tue, 17 Apr 2018 08:59:35 +

> If IP supports RSC and skb has 2B reserved for alignment we end up
> with none packets receive correctly (2B missing in the each skb).
> We can either leave few customers without support in Linux driver or
> let them use the driver with decrease performance.

You probably want to find a way to memmove() the headers to be aligned
in this case, and then point the data afterwards into SKB page frags.


RE: [PATCH 0/3] Receive Side Coalescing for macb driver

2018-04-17 Thread Rafal Ozieblo
From: David Miller [mailto:da...@davemloft.net] 
Sent: 16 kwietnia 2018 17:09

> From: Rafal Ozieblo 
> Date: Sat, 14 Apr 2018 21:53:07 +0100
>
>> This patch series adds support for receive side coalescing for Cadence 
>> GEM driver. Receive segmentation coalescing is a mechanism to reduce 
>> CPU overhead. This is done by coalescing received TCP message segments 
>> together into a single large message. This means that when the message
>> is complete the CPU only has to process the single header and act upon 
>> the one data payload.
>
> You're going to have to think more deeply about enabling this feature.
>
> If you can't adjust the receive buffer offset, then the various packet header 
> fields will be unaligned.
>
> On certain architectures this will result in unaligned traps all over the 
> networking stack as the packet is being processed.
>
> So enabling this by default will hurt performance on such systems a lot.
>
> The whole "skb_reserve(skb, NET_IP_ALIGN)" is not just for fun, it is 
> absolutely essential.

I totally agree with you. But the issue is with IP cores which has this feature 
implemented in.
Even when user does not want to use that feature but he bought IP with 
configuration supported RSC, then he has to switch off IP alignment.
There is no IP alignment with RSC in the GEM:
"When the gem rsc define has been set the receive buffer offset cannot be 
changed in the network configuration register."
If IP supports RSC and skb has 2B reserved for alignment we end up with none 
packets receive correctly (2B missing in the each skb).
We can either leave few customers without support in Linux driver or let them 
use the driver with decrease performance.



Re: [PATCH 0/3] Receive Side Coalescing for macb driver

2018-04-16 Thread David Miller
From: Rafal Ozieblo 
Date: Sat, 14 Apr 2018 21:53:07 +0100

> This patch series adds support for receive side coalescing
> for Cadence GEM driver. Receive segmentation coalescing
> is a mechanism to reduce CPU overhead. This is done by
> coalescing received TCP message segments together into
> a single large message. This means that when the message
> is complete the CPU only has to process the single header
> and act upon the one data payload.

You're going to have to think more deeply about enabling this
feature.

If you can't adjust the receive buffer offset, then the various
packet header fields will be unaligned.

On certain architectures this will result in unaligned traps
all over the networking stack as the packet is being processed.

So enabling this by default will hurt performance on such
systems a lot.

The whole "skb_reserve(skb, NET_IP_ALIGN)" is not just for fun,
it is absolutely essential.