Skip to content

RFC lro: Generic Large Receive Offload for TCP traffic

Jan-Bernd Themann linuxppc-dev lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest0 of 1 patch 6 repliesIn review

Patches in v1 No applies recorded yet

The patch the cover letter announces is not in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/1] lro: Generic Large Receive Offload for TCP traffic

Hi,

Thanks a lot for your comments so far.
This generic LRO patch differs from the last one in several points. A new interface for a "receive in pages" mode has been added and tested with an eHEA prototype. Seems to work well.

Does this extended interface seem to be sufficient?

Below some more explanations:

Thanks,
Jan-Bernd

Changes to http://www.spinics.net/lists/netdev/msg35490.html :

- Interfaces are changed to allow later support for IPv6 / UDP
- New interface to support "receive in pages"
- TCP checksums are updated properly
- TCP packets with push flag are aggregated now
- Timestamps are now compared using after()

The additional interface to support "receive in pages":

void lro_receive_frags(struct net_lro_mgr *lro_mgr,
struct skb_frag_struct *frags, int len, int true_size, void *priv);

void lro_vlan_hwaccel_receive_frags(struct net_lro_mgr *lro_mgr,
struct skb_frag_struct *frags, int len,
int true_size, struct vlan_group *vgrp, u16 vlan_tag,
void *priv);

These functions generate SKBs only for the first packet of an LRO session. The next fragment list to be aggregated will be added in the fragment list of that SKB.

The reason why this is a smart approach is described in:
http://www.spinics.net/lists/netdev/msg35634.html

All other packets that do not match the LRO requirements are put in an SKB and sent to the stack.

Packets that are received in an extra buffer (small packets) and thus not in an skb fragment can be sent by the driver to the stack after flushing the appropriate LRO sessions:

void lro_flush_pkt(struct net_lro_mgr *lro_mgr,

                   struct iphdr *iph, struct tcphdr *tcph);

or

void lro_flush_all(struct net_lro_mgr *lro_mgr);