From mboxrd@z Thu Jan 1 00:00:00 1970 From: Willem de Bruijn Subject: Re: LTP recv/recvmsg tests failing on 3.17 Date: Tue, 23 Sep 2014 12:24:57 -0400 Message-ID: References: <20140923091108.2788de76@as> <20140923103933.1b5fb88b@as> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Network Development To: Chuck Ebbert Return-path: Received: from mail-qa0-f44.google.com ([209.85.216.44]:52298 "EHLO mail-qa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753708AbaIWQZ3 (ORCPT ); Tue, 23 Sep 2014 12:25:29 -0400 Received: by mail-qa0-f44.google.com with SMTP id x12so1940698qac.3 for ; Tue, 23 Sep 2014 09:25:29 -0700 (PDT) In-Reply-To: <20140923103933.1b5fb88b@as> Sender: netdev-owner@vger.kernel.org List-ID: > But I was also wondering why we return EAGAIN here for no data waiting, > when we return EINVAL for the same case with a different type of data. > There's no spec and it's not documented, so I guess the answer is "it's > always been that way." EAGAIN is the common response. I don't know why TCP urgent data returns EINVAL. It is unusual enough that the relevant line in tcp_recv_urg explicitly comments on it: return -EINVAL; /* Yes this is right ! */