From owner-freebsd-wireless@FreeBSD.ORG Sat Aug 3 19:49:43 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CB841DD2 for ; Sat, 3 Aug 2013 19:49:43 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22e.google.com (mail-wg0-x22e.google.com [IPv6:2a00:1450:400c:c00::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E7542BEE for ; Sat, 3 Aug 2013 19:49:43 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id k13so1389645wgh.13 for ; Sat, 03 Aug 2013 12:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=2MtzhwqTOC9Ym0zv8SBeI7j8XJmrmT6FwEQygBFW0Pg=; b=VoKa70rRnf04fcIv2G+P4SduF/6M164byIhKcezo0lAEdupErXCO0xOwQ7vwnA4ZRd 4xpFTJKIq2020k6ZJS3d+mitppREgKSRFn6dRd148eRCdm7kx/ty/JEKcMX8lACrdjOG 57RbgiGNILr8+VflQeZ7wm8k5hlttOMDp74JbOTLfUJyoln6HbojyXBnA8xvy5DNrqXd aOW0JEmo5LqgpI0j43luDW1kHzgeiSHCkdH335QgZ0v37R5PA9KgTJLKzYrf2vBaRP1f ASGUsCexhpWrNP49X4hTovnMI5pjVDgY8AuJNAq7v/oV6eBiLO9PeISuNFgbSYwqkQND dFtQ== MIME-Version: 1.0 X-Received: by 10.180.160.165 with SMTP id xl5mr2365438wib.46.1375559381638; Sat, 03 Aug 2013 12:49:41 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Sat, 3 Aug 2013 12:49:41 -0700 (PDT) In-Reply-To: <003201ce9081$b401a270$1c04e750$@info> References: <51f3f0ce.055a420a.2e1e.fffff220SMTPIN_ADDED_BROKEN@mx.google.com> <002d01ce8c46$a13b23d0$e3b16b70$@info> <002701ce8e03$c033f640$409be2c0$@info> <002401ce8f5f$fc5ad780$f5108680$@info> <001001ce903b$e77a5f70$b66f1e50$@info> <001e01ce907e$f1daf220$d590d660$@info> <003201ce9081$b401a270$1c04e750$@info> Date: Sat, 3 Aug 2013 12:49:41 -0700 X-Google-Sender-Auth: r4HLsznKrMTTDk3O8PxfEhXdHjQ Message-ID: Subject: Re: [IWN] Reviw split 2 From: Adrian Chadd To: Cedric GROSS Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 19:49:43 -0000 On 3 August 2013 12:43, Cedric GROSS wrote: >> Ok, why'd you change the debug print macro to check if the debug flags >> match the check, rather than if the debug flags are set in the check? >> >> ie >> >> (f) & (v) >> >> versus >> ( (f) & (v) == (v) ) >> >> ? > > It's for reducing tracing verbosity and just do trace when associate with > another IWN_DEBUG_* > So if you wish to debug only XMIT, trace also print only associate with that > level (ie IWN_DEBUG_TRACE | IWN_DEBUG_XMIT) Ok. I like the general idea, but I think overloading that for the general case is against POLA. Eg, ath(4), ath_hal(4), net80211(4) all have the mask idea, rather than the exact match idea. So there are cases where multiple bits are set in a debug mask (eg some INPUT and 11N flags in net80211) since they're relevant for both. So I'd like to come up with an alternative way to do trace debugging like you ask. Maybe what we should do is add a DPRINTF_TRACE() macro for things that are specifically _trace_ events, then have a separate trace bitmap for trace debugging. -adrian