From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758251AbeAINzo (ORCPT + 1 other); Tue, 9 Jan 2018 08:55:44 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:45616 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758179AbeAINzl (ORCPT ); Tue, 9 Jan 2018 08:55:41 -0500 X-Google-Smtp-Source: ACJfBosB3+EbGnUd5KAeGj5A2voUl2s7BcjWeKgA+02yjIvB5WT/rAj6CRzJY1xMBoHo7J/MW4sW+A== From: Dmitry Safonov To: linux-kernel@vger.kernel.org Cc: 0x7f454c46@gmail.com, Dmitry Safonov , Arnd Bergmann , "David S. Miller" , David Windsor , Eric Dumazet , Ingo Molnar , Johannes Berg , Mark Rutland , Radu Rendec , "Reshetova, Elena" , netdev@vger.kernel.org Subject: [PATCH 2/5] pktgen: Add missing !flag parameters Date: Tue, 9 Jan 2018 13:55:32 +0000 Message-Id: <20180109135535.15237-3-dima@arista.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180109135535.15237-1-dima@arista.com> References: <20180109135535.15237-1-dima@arista.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: o FLOW_SEQ now can be disabled with pgset "flag !FLOW_SEQ" o FLOW_SEQ and FLOW_RND are antonyms, as it's shown by pktgen_if_show() o IPSEC now may be disabled Note, that IPV6 is enabled with dst6/src6 parameters, not with a flag parameter. Signed-off-by: Dmitry Safonov --- net/core/pktgen.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/net/core/pktgen.c b/net/core/pktgen.c index f95a15086225..ab63943ffd03 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -1285,9 +1285,12 @@ static ssize_t pktgen_if_write(struct file *file, else if (strcmp(f, "!SVID_RND") == 0) pkt_dev->flags &= ~F_SVID_RND; - else if (strcmp(f, "FLOW_SEQ") == 0) + else if (strcmp(f, "FLOW_SEQ") == 0 || strcmp(f, "!FLOW_RND") == 0) pkt_dev->flags |= F_FLOW_SEQ; + else if (strcmp(f, "FLOW_RND") == 0 || strcmp(f, "!FLOW_SEQ") == 0) + pkt_dev->flags &= ~F_FLOW_SEQ; + else if (strcmp(f, "QUEUE_MAP_RND") == 0) pkt_dev->flags |= F_QUEUE_MAP_RND; @@ -1302,6 +1305,9 @@ static ssize_t pktgen_if_write(struct file *file, #ifdef CONFIG_XFRM else if (strcmp(f, "IPSEC") == 0) pkt_dev->flags |= F_IPSEC_ON; + + else if (strcmp(f, "!IPSEC") == 0) + pkt_dev->flags &= ~F_IPSEC_ON; #endif else if (strcmp(f, "!IPV6") == 0) -- 2.13.6