From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932342AbcHXNCV (ORCPT ); Wed, 24 Aug 2016 09:02:21 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:35916 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753174AbcHXNCS (ORCPT ); Wed, 24 Aug 2016 09:02:18 -0400 Message-ID: <1472043735.14381.69.camel@edumazet-glaptop3.roam.corp.google.com> Subject: Re: [REGRESSION] Select hang with zero sized UDP packets From: Eric Dumazet To: Dan Akunis Cc: labbott@redhat.com, David Miller , kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, samanthakumar@google.com, willemb@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 24 Aug 2016 06:02:15 -0700 In-Reply-To: <2ABF798B42E64D9C89DEB806A2E636B5@mtl.com> References: <08d225a8-e98f-c0c6-271d-acc2584347fc@redhat.com> <20160823.112515.318902967155957764.davem@davemloft.net> <2ABF798B42E64D9C89DEB806A2E636B5@mtl.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2016-08-24 at 11:22 +0300, Dan Akunis wrote: > When select wakes up on a UDP socket, user is expecting to get data. Getting > 0 from recvfrom() or whatever read function she uses, is a wrong attitude. > I agree with David. > > The unit test that expects select to wake up is wrong and should be changed. > Please do not top post on netdev mailing list. Program is fine and wont be changed to work around a kernel bug. We definitely can send and receive UDP messages with 0 payload. So select() should unblock when one such frame is received, otherwise you could fill up the receive queue with a lot of frames like that and when SO_RCVBUF limit is reached, block future messages. UDP is a datagram protocol. Bug fix is merged : https://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=e83c6744e81abc93a20d0eb3b7f504a176a6126a