Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755662AbbLGEap (ORCPT ); Sun, 6 Dec 2015 23:30:45 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:35188 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755284AbbLGEao (ORCPT ); Sun, 6 Dec 2015 23:30:44 -0500 Date: Sun, 06 Dec 2015 23:30:38 -0500 (EST) Message-Id: <20151206.233038.1580536748391971635.davem@davemloft.net> To: rweikusat@mobileactivedefense.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/02] core: enable more fine-grained datagram reception control From: David Miller In-Reply-To: <874mfv7055.fsf@doppelsaurus.mobileactivedefense.com> References: <874mfv7055.fsf@doppelsaurus.mobileactivedefense.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 06 Dec 2015 20:30:43 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1277 Lines: 24 From: Rainer Weikusat Date: Sun, 06 Dec 2015 21:11:34 +0000 > The __skb_recv_datagram routine in core/ datagram.c provides a general > skb reception factility supposed to be utilized by protocol modules > providing datagram sockets. It encompasses both the actual recvmsg code > and a surrounding 'sleep until data is available' loop. This is > inconvenient if a protocol module has to use additional locking in order > to maintain some per-socket state the generic datagram socket code is > unaware of (as the af_unix code does). The patch below moves the recvmsg > proper code into a new __skb_try_recv_datagram routine which doesn't > sleep and renames wait_for_more_packets to > __skb_wait_for_more_packets, both routines being exported interfaces. The > original __skb_recv_datagram routine is reimplemented on top of these > two functions such that its user-visible behaviour remains unchanged. > > Signed-Off-By: Rainer Weikusat Applied to net-next. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/