From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10530C28CC5 for ; Wed, 5 Jun 2019 18:24:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E32D72075C for ; Wed, 5 Jun 2019 18:24:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726532AbfFESYD (ORCPT ); Wed, 5 Jun 2019 14:24:03 -0400 Received: from smtprelay0242.hostedemail.com ([216.40.44.242]:41368 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725950AbfFESYD (ORCPT ); Wed, 5 Jun 2019 14:24:03 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id 1ABD163D; Wed, 5 Jun 2019 18:24:02 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: women45_600e0ccee119 X-Filterd-Recvd-Size: 2384 Received: from XPS-9350 (cpe-23-242-196-136.socal.res.rr.com [23.242.196.136]) (Authenticated sender: joe@perches.com) by omf10.hostedemail.com (Postfix) with ESMTPA; Wed, 5 Jun 2019 18:24:01 +0000 (UTC) Message-ID: <95fa3d641e5df79b7e69ff377593c4273e812bb6.camel@perches.com> Subject: Re: [PATCH RFC iproute2-next v4] tc: add support for action act_ctinfo From: Joe Perches To: Kevin Darbyshire-Bryant Cc: netdev@vger.kernel.org, stephen@networkplumber.org Date: Wed, 05 Jun 2019 11:23:59 -0700 In-Reply-To: <20190603135040.75408-1-ldir@darbyshire-bryant.me.uk> References: <20190602185020.40787-1-ldir@darbyshire-bryant.me.uk> <20190603135040.75408-1-ldir@darbyshire-bryant.me.uk> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.5-0ubuntu0.18.10.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 2019-06-03 at 14:50 +0100, Kevin Darbyshire-Bryant wrote: > ctinfo is an action restoring data stored in conntrack marks to various > fields. At present it has two independent modes of operation, > restoration of DSCP into IPv4/v6 diffserv and restoration of conntrack > marks into packet skb marks. [] > v2 - fix whitespace issue in pkt_cls > fix most warnings from checkpatch - some lines still over 80 chars > due to long TLV names. > v3 - fix some dangling else warnings. > refactor stats printing to please checkpatch. > send zone TLV even if default '0' zone. > now checkpatch clean even though I think some of the formatting > is horrible :-) Strict 80 column limits with long identifiers are just silly. I don't know how strictly enforced the iproute2 80 column limit actually is, but I suggest ignoring that limit where appropriate. e.g.: > diff --git a/tc/m_ctinfo.c b/tc/m_ctinfo.c [] > +static int print_ctinfo(struct action_util *au, FILE *f, struct rtattr *arg) > +{ [] > + if (tb[TCA_CTINFO_PARMS_DSCP_MASK]) { > + if (RTA_PAYLOAD(tb[TCA_CTINFO_PARMS_DSCP_MASK]) >= > + sizeof(__u32)) I think code like this should just be single line. > + if (tb[TCA_CTINFO_PARMS_DSCP_STATEMASK]) { > + if (RTA_PAYLOAD(tb[TCA_CTINFO_PARMS_DSCP_STATEMASK]) >= > + sizeof(__u32)) > + dscpstatemask = rta_getattr_u32( > + tb[TCA_CTINFO_PARMS_DSCP_STATEMASK]); here too, etc...