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...


Reply via email to