From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH iproute2-next v2] net:sched: add action inheritdsfield to skbedit Date: Thu, 12 Jul 2018 15:05:26 -0700 Message-ID: <20180712150526.6c4ed31d@xeon-e3> References: <20180712160926.163317-1-qiaobinf@bu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dsahern@gmail.com, davem@davemloft.net, netdev@vger.kernel.org, jhs@mojatatu.com, michel@digirati.com.br, marcelo.leitner@gmail.com, xiyou.wangcong@gmail.com, dcaratti@redhat.com To: Qiaobin Fu Return-path: Received: from mail-pf0-f195.google.com ([209.85.192.195]:34957 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732310AbeGLWRB (ORCPT ); Thu, 12 Jul 2018 18:17:01 -0400 Received: by mail-pf0-f195.google.com with SMTP id q7-v6so20276813pff.2 for ; Thu, 12 Jul 2018 15:05:29 -0700 (PDT) In-Reply-To: <20180712160926.163317-1-qiaobinf@bu.edu> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 12 Jul 2018 12:09:26 -0400 Qiaobin Fu wrote: > + if (*flags & SKBEDIT_F_INHERITDSFIELD) > + print_string(PRINT_ANY, "inheritdsfield", " %s", > + "inheritdsfield"); Flags should be represented in JSON output as a null value (or boolean). print_null(PRINT_ANY, "inheritdsfield", " %s", "inheritdsfield"); This will generate: "inheritdsfield" : null, Instead of: "inheritdsfield" : "inheritdsfield",