netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* UDP GRO do not restore ervery UDP Packet
@ 2019-04-09  6:09 Sean Tong
  2019-04-09  7:58 ` Paolo Abeni
  0 siblings, 1 reply; 2+ messages in thread
From: Sean Tong @ 2019-04-09  6:09 UTC (permalink / raw)
  To: netdev

I find that I do not restore every UDP paket from recvmsg when I
programming with  UDP_GRO in kernel version 5.0
I can get gso_size, but I do not know the last UDP packet size in
aggregate datagram.
For example, recvmsg returns  a packet size 50  of  and gso_size of
24, so the UDP packets is restored without knowing whether it is
24+24+2 split into 3 packets or 24+26 split into 2 pakcets.
Is there any way to get the last UDP packet size or number of merged
UDP packets?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: UDP GRO do not restore ervery UDP Packet
  2019-04-09  6:09 UDP GRO do not restore ervery UDP Packet Sean Tong
@ 2019-04-09  7:58 ` Paolo Abeni
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Abeni @ 2019-04-09  7:58 UTC (permalink / raw)
  To: Sean Tong, netdev

Hi,

On Tue, 2019-04-09 at 14:09 +0800, Sean Tong wrote:
> For example, recvmsg returns  a packet size 50  of  and gso_size of
> 24, so the UDP packets is restored without knowing whether it is
> 24+24+2 split into 3 packets or 24+26 split into 2 pakcets.
> Is there any way to get the last UDP packet size or number of merged
> UDP packets?

In the described scenario, the ingress packets lengths are: 24, 24, 2.

The sequence 24, 26 is not possible.

Generally speaking, if the aggregated packet length is not a multiple
of gro_size, the length of the last UDP packet aggregated in the GRO
one is: 

<GRO packet size> % gso_size.

(2, in the above example).

If you observe something differnt, it's a bug and must be fixed -
please provide detailed setup information, thanks!

Paolo



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-09  7:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-09  6:09 UDP GRO do not restore ervery UDP Packet Sean Tong
2019-04-09  7:58 ` Paolo Abeni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).