# Is there any plan to support GRO



## redriver (Jan 11, 2016)

LRO has been enabled since FreeBSD 7.1. Is there any plan to support GRO (Generic Receive Offloading)?

I also found Linux disabled LRO and enabled GRO by default. It looks like GRO is better than LRO.


----------



## SirDice (Jan 11, 2016)

Not sure if it's the same thing but TSO is available. Although not all network drivers/cards support it.


----------



## redriver (Jan 12, 2016)

LRO has some shortcomings compared with GRO. I found some materials introducing LRO and GRO on Linux even if it is very old (2009). It said:



> Still, a solution has emerged in the form of "large receive offload" (LRO), which takes a very similar approach: incoming packets are merged at reception time so that the operating system sees far fewer of them. This merging can be done either in the driver or in the hardware; even LRO emulation in the driver has performance benefits. LRO is widely supported by 10G drivers under Linux.
> 
> But LRO is a bit of a flawed solution, according to Herbert; the real problem is that it "merges everything in sight." This transformation is lossy; if there are important differences between the headers in incoming packets, those differences will be lost. And that breaks things. If a system is serving as a router, it really should not be changing the headers on packets as they pass through. LRO can totally break satellite-based connections, where some very strange header tricks are done by providers to make the whole thing work. And bridging breaks, which is a serious problem: most virtualization setups use a virtual network bridge between the host and its clients. One might simply avoid using LRO in such situations, but these also tend to be the workloads that one really wants to optimize. Virtualized networking, in particular, is already slower; any possible optimization in this area is much needed.
> 
> ...


It claims that for router/bridge, LRO cannot work. I don't think GRO can work in such use case.
Another question is: Will FreeBSD do more optimization on receiver side apart from LRO? What it is if answer is yes?


----------



## junovitch@ (Jan 15, 2016)

The same question recently came up on the freebsd-net mailing list (see https://lists.FreeBSD.org/pipermail/freebsd-net/2016-January/044272.html).  The end was patches to implement the feature are welcome.


----------

