Thread (23 messages) 23 messages, 5 authors, 2014-07-02

Re: [PATCH net-next] xen-netfront: try linearizing SKB if it occupies too many slots

From: Eric Dumazet <hidden>
Date: 2014-05-16 13:04:37

On Fri, 2014-05-16 at 12:08 +0100, Wei Liu wrote:
Some workload, such as Redis can generate SKBs which make use of
compound pages. Netfront doesn't quite like that because it doesn't want
to send packet that occupies exessive slots to the backend as backend
might deem it malicious. On the flip side these packets are actually
legit, the size check at the beginning of xennet_start_xmit ensures that
packet size is below 64K.

So we linearize SKB if it occupies too many slots. If the linearization
fails then the SKB is dropped.

Signed-off-by: Wei Liu <redacted>
Cc: David Vrabel <redacted>
Cc: Konrad Wilk <redacted>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Stefan Bader <redacted>
Cc: Zoltan Kiss <redacted>
---
 drivers/net/xen-netfront.c |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
This is likely to fail on typical host.

What about adding a smart helper trying to aggregate consecutive
smallest fragments into a single frag ?

This would be needed for bnx2x for example as well.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help