From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2.tohojo.dk (mail2.tohojo.dk [77.235.48.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 8D0953B25D for ; Thu, 1 Sep 2016 05:42:34 -0400 (EDT) X-Virus-Scanned: amavisd-new at mail2.tohojo.dk DKIM-Filter: OpenDKIM Filter v2.10.3 mail2.tohojo.dk CF73A4161D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=201310; t=1472722951; bh=WSjVcnfNTOcxGNcyaYJYbWY63Z9JMxwPUzbOXs0iuBY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=t7qTZEzlVzcPaDxUG4UJi1pl7XuVU9ndFNXYkoiyrjo08bi0wrjc7HRKmalDPZvHt xTbcccWhZR76F2doHNpGu1HC82RMqeZQdY6z2LkdDEv8L4paMGYFkq7J8t7SK4DSYm LSMM8CZySKabtlEFXi2Boo4gIVYSgAodszxhdNCs= Received: by alrua-kau.kau.toke.dk (Postfix, from userid 1000) id 2BFDDC40231; Thu, 1 Sep 2016 11:42:31 +0200 (CEST) From: =?utf-8?Q?Toke_H=C3=B8iland-J=C3=B8rgensen?= To: Johannes Berg Cc: make-wifi-fast@lists.bufferbloat.net, linux-wireless@vger.kernel.org References: <20160824162015.29933-1-toke@toke.dk> <20160830131548.6014-1-toke@toke.dk> <1472677599.5470.13.camel@sipsolutions.net> <87inug81vo.fsf@toke.dk> <1472718860.4249.0.camel@sipsolutions.net> <8737lk816p.fsf@toke.dk> <1472720848.9608.1.camel@sipsolutions.net> <8760qgugb0.fsf@toke.dk> <1472722020.9608.3.camel@sipsolutions.net> Date: Thu, 01 Sep 2016 11:42:31 +0200 In-Reply-To: <1472722020.9608.3.camel@sipsolutions.net> (Johannes Berg's message of "Thu, 01 Sep 2016 11:27:00 +0200") X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <871t14ufaw.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Make-wifi-fast] [PATCH v4] mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue. X-BeenThere: make-wifi-fast@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2016 09:42:34 -0000 Johannes Berg writes: >> Yeah, was going to do that anyway. But since I'm touching the code >> anyway, this might be an opportunity to avoid constructs like this: >>=20 >> if (!invoke_tx_handlers(tx)) >> =C2=A0 /* continue sending the packet */ >>=20 >> Most other succeed/fail functions seem to be of type bool, so it >> would help consistency as well. Unless there is some particular >> reason why this function happens to be using 0 to indicate success? >>=20 > > It's just convention in the kernel, really. > > IMHO if a function has a bool return value it should be have a more > expressive name that indicates better what's going on, like e.g. > > bool ieee80211_is_radar_required(...); > > but of course that's not always done. Well, it's applied somewhat inconsistently across mac80211, it seems (e.g. ieee80211_tx() and ieee80211_tx_prepare_skb() are bool, while invoke_tx_handlers() and ieee80211_skb_resize() are int). But okay, don't have that strong an opinion about the colour of this particular bikeshed so I'll keep it the way it is ;) -Toke