From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id B08B73BA8E for ; Mon, 16 Jul 2018 13:58:26 -0400 (EDT) Received: by mail-pg1-x541.google.com with SMTP id v13-v6so7805165pgr.10 for ; Mon, 16 Jul 2018 10:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Fv8JGFLpronY3EbNXoPtBopsrxX0U9b6hC27a0N4QFA=; b=eeZe6VFYCk5pBjEoUv9wV9/Qh+qFkv0PtTv8+fpoofl0TF6TA6sCgSYWKD8E+IcMOy BSu7A8hChYIwqTeQCNZ+99JueMGrP7xPE9iouqpa9ipMU4/a/JwlAdobkrip+rvvUvyP Xp4/8q+SEHv8rQm0YLAKfh5SSbDSzY9Xd5lWJaNF5jRMs5AjWbzdiAseCWxaA4lGZBxo nwgxQ6dWZDhsvl24SOpKbcI8EBN4TDLijX8BR5u3j1f0XWUOL92iRFlkpoR7iNU9sLA1 wKxKugKLvrLWVCtXJzvijMel3q/W/OWzKfU+PH3Uj7zTQn5fcl1msL7E49CF2COgNgHM CFrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Fv8JGFLpronY3EbNXoPtBopsrxX0U9b6hC27a0N4QFA=; b=mXDY6P12+0FUd8B22RWV4rfFBrjaJcM6LzrFGnfBvm4fmTUOxncD5jQ+pGuvxDrENn l3s+C9mHsF0h5WHDUjfJpNjSnMY3EmM3ZdjfUPHnMAKbdxvL5hCjp1ZM2sX7AHU/qH5I nV/BNgz+oTU8lKdQLqcq6su+FLJL2YQ47sEuLizc5qpo9gevG+E97YYa2USNuOuRuv9N FdVXJsLxRkTL5c+Ghi6iWNgMFDSEEkt3KmFkTg6uhsa0WONACqGPgZ678DrppXb+GetK jmQ/qfA7ZZmYWajk/7OptH6+10+s/XZFd0IE6zHsURiLHSK8j9PeUvzGSHM/ynhgkChv bVhw== X-Gm-Message-State: AOUpUlHFAz6tSK5GgAWjH1bkda5n3odLZmPtj30SUXwVaoT5ki1Y5I1H omMvlM42Bn+8lE7vga82P1YLlA== X-Google-Smtp-Source: AAOMgpfFA/F6ZRn4WM+APSaHv5dpvwyJu2hd1pSWhMymiyPx6VRNRVAYfCsLcdUqFOElfFddoSmDXA== X-Received: by 2002:a63:cc04:: with SMTP id x4-v6mr16081673pgf.33.1531763905841; Mon, 16 Jul 2018 10:58:25 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id l4-v6sm36593244pgn.46.2018.07.16.10.58.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Jul 2018 10:58:25 -0700 (PDT) Date: Mon, 16 Jul 2018 10:58:23 -0700 From: Stephen Hemminger To: Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= Cc: netdev@vger.kernel.org, cake@lists.bufferbloat.net Message-ID: <20180716105823.626b8a81@xeon-e3> In-Reply-To: <87o9f75akv.fsf@toke.dk> References: <20180716163926.4826-1-toke@toke.dk> <20180716100646.788fc9c0@xeon-e3> <87o9f75akv.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Cake] [PATCH iproute2-next v10] Add support for CAKE qdisc X-BeenThere: cake@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Cake - FQ_codel the next generation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2018 17:58:26 -0000 On Mon, 16 Jul 2018 19:56:00 +0200 Toke H=C3=B8iland-J=C3=B8rgensen wrote: > Stephen Hemminger writes: >=20 > > On Mon, 16 Jul 2018 18:39:26 +0200 > > Toke H=C3=B8iland-J=C3=B8rgensen wrote: > > =20 > >> +#define PRINT_TSTAT(name, attr, fmts, val) do { \ > >> + if (GET_TSTAT(0, attr)) { \ > >> + fprintf(f, name); \ > >> + for (i =3D 0; i < num_tins; i++) \ > >> + fprintf(f, " %12" fmts, val); \ > >> + fprintf(f, "\n"); \ > >> + } \ > >> + } while (0) =20 > > > > Couldn't this be a function? =20 >=20 > Guess so? But keeping it as a macro keeps it closer to where it is > defined, and keeps the macro definitions together. IMO this is more > readable than splitting things up... >=20 > -Toke Personal preference. I hate macros, leftover from hours of debugging bad expansions.