From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4657E42C51; Wed, 7 Jun 2023 17:42:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD975410F9; Wed, 7 Jun 2023 17:42:56 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 068F9410F6 for ; Wed, 7 Jun 2023 17:42:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686152574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oQxpAqlX/VvrS9k3r1lesMshkfWfvwYvN9FMU96IMrU=; b=X3CJJPmqyJudxlLVHkTpH4yQIL9U87Ju1Va1pltLpFlvefesmHVr/Mpkb/jjddIcmASHpU jiKow8sy2+hLtg6udGQIYz/HGrzEAUDXFwO7DLWG90B/W8Se7g+KQeFpV7Ao1is6OAmGde wmeOylGSkih0l+NS56j/9hannmFpFBU= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-99-8emx3M06P1iTN65b2O8C2w-1; Wed, 07 Jun 2023 11:42:48 -0400 X-MC-Unique: 8emx3M06P1iTN65b2O8C2w-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-9715654aba1so100871866b.0 for ; Wed, 07 Jun 2023 08:42:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686152550; x=1688744550; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oQxpAqlX/VvrS9k3r1lesMshkfWfvwYvN9FMU96IMrU=; b=hc5Wa8vwkFjBPxmory/mz8YQiG1WB3ALXHuoL6MBvrOXPRoLdItIcT8Cp4nA/5GyWb 1SEYuJD+z0TwQT7t9vzrIZ24BcTg534lbW0ravjDEsmDtI9LGx6xonY0unTELYm9cmO3 rdcMORcMszCDc400dFUDWcZLsoPdyXvJ/OLnkLKIJrNudpgehjygrsCXLA89SvdEgyQD 2gqg0x5vgbxEBNz7HvRxCk63fWHQFkyWHj9t/QcB9x2d8Ohdt1yBnZ3jOMENS1Mnv4qq yON9mI9iTIORAMipi8RzxGPREQopgJyNdhLi6T1HM5oZ1V9OPfF6BoBJHT3xUIheqYEh nCEQ== X-Gm-Message-State: AC+VfDwhBeDdEm/oVvgsBWh7fVw00jvB0u29XDO3WCkdDyo75ATyoiKe P3T9ePQq90P5MPvkXcSgE/oAq7shMioSvcxQqKHyPHDhVb6jYSQ+EAapJxwpB7FZx9vMTgjD66G Td+ALrLpT6BW07+rGvtQ= X-Received: by 2002:a17:907:a42b:b0:978:6c50:dde5 with SMTP id sg43-20020a170907a42b00b009786c50dde5mr5032274ejc.36.1686152550390; Wed, 07 Jun 2023 08:42:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4rzb6EpzUq8c6I0grc++vO2nu8Lq7bTfRmFLyCHn81UGqTbFVVXtkSWWB3NrBhK+xMk/NSE1qdiXwNaLL4zyo= X-Received: by 2002:a17:907:a42b:b0:978:6c50:dde5 with SMTP id sg43-20020a170907a42b00b009786c50dde5mr5032261ejc.36.1686152550075; Wed, 07 Jun 2023 08:42:30 -0700 (PDT) MIME-Version: 1.0 References: <20230602182928.1717802-1-mkp@redhat.com> <20230606211242.2855795-1-mkp@redhat.com> In-Reply-To: From: Mike Pattrick Date: Wed, 7 Jun 2023 11:42:18 -0400 Message-ID: Subject: Re: [PATCH v5] app/testpmd: expand noisy neighbour forward mode support To: Ferruh Yigit Cc: Aman Singh , Yuying Zhang , ktraynor@redhat.com, dev@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Jun 6, 2023 at 6:23=E2=80=AFPM Ferruh Yigit = wrote: > > On 6/6/2023 10:12 PM, Mike Pattrick wrote: > > Previously the noisy neighbour vnf simulation would only operate in io > > mode, forwarding packets as is. However, this limited the usefulness of > > noisy neighbour simulation. > > > > This feature has now been expanded to supporting mac, macswap, and > > 5tswap modes. To facilitate adding this support, some new header files > > were added. > > > > Signed-off-by: Mike Pattrick > > --- > > v2: Reverted changes to random memory lookup > > v3: Refactored entire patch > > v4: Implemented recommended formatting changes > > v5: Corrected copyright statement and formatting changes > > <...> > > > @@ -226,6 +291,15 @@ noisy_fwd_begin(portid_t pi) > > "--noisy-lkup-memory-size must be > 0\n"); > > } > > > > + if (noisy_fwd_mode =3D=3D NOISY_FWD_MODE_IO) > > + noisy_vnf_engine.packet_fwd =3D pkt_burst_io; > > + else if (noisy_fwd_mode =3D=3D NOISY_FWD_MODE_MAC) > > + noisy_vnf_engine.packet_fwd =3D pkt_burst_mac; > > + else if (noisy_fwd_mode =3D=3D NOISY_FWD_MODE_MACSWAP) > > + noisy_vnf_engine.packet_fwd =3D pkt_burst_macswap; > > + else if (noisy_fwd_mode =3D=3D NOISY_FWD_MODE_5TSWAP) > > + noisy_vnf_engine.packet_fwd =3D pkt_brust_5tswap; > > + > > When noisy forward mode is set, it is not possbile to see what mode is > set, what about keeping '.fwd_mode_name' longer, > like "noisy - ", and update it based on selected mode? > > This way "show config fwd" command displays selected noisy mode. > > > return 0; > > } > > > > @@ -233,6 +307,6 @@ struct fwd_engine noisy_vnf_engine =3D { > > .fwd_mode_name =3D "noisy", > > .port_fwd_begin =3D noisy_fwd_begin, > > .port_fwd_end =3D noisy_fwd_end, > > - .stream_init =3D common_fwd_stream_init, > > - .packet_fwd =3D pkt_burst_noisy_vnf, > > + .stream_init =3D common_fwd_stream_init, > > + .packet_fwd =3D pkt_burst_io, > > }; > > diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c > > index 3b37809baf..d29c65fef4 100644 > > --- a/app/test-pmd/parameters.c > > +++ b/app/test-pmd/parameters.c > > @@ -190,6 +190,7 @@ usage(char* progname) > > " anon: use regular DPDK memory to create and anonymous= memory to populate mempool\n" > > " xmem: use anonymous memory to create and populate mem= pool\n" > > " xmemhuge: use anonymous hugepage memory to create and= populate mempool\n"); > > + printf(" --noisy-fwd-mode=3D: set the sub= -fwd mode, defaults to io\n"); > > Main forwarding parameter is '--forward-mode=3DN', and while testing I > searched for 'forward' in the testpmd help output but not able to find > this command, because of shortened 'fwd'. > > What do you think to have full '--noisy-forward-mode' to be more > consistent with existing '--forward-mode=3DN'? > > > > printf(" --noisy-tx-sw-buffer-size=3DN: size of FIFO buffer\n"); > > printf(" --noisy-tx-sw-buffer-flushtime=3DN: flush FIFO after N = ms\n"); > > printf(" --noisy-lkup-memory=3DN: allocate N MB of VNF memory\n"= ); > > @@ -704,6 +705,7 @@ launch_args_parse(int argc, char** argv) > > { "noisy-lkup-num-writes", 1, 0, 0 }, > > { "noisy-lkup-num-reads", 1, 0, 0 }, > > { "noisy-lkup-num-reads-writes", 1, 0, 0 }, > > + { "noisy-fwd-mode", 1, 0, 0 }, > > If there will be a new version can you please move it to the top of the > noisy-* block, as done in the help string? > And this is same for all new code, from 'extern' to global variable to > .rst documentation update. You've made some good suggestions here, I'll send you a new version. Thanks for the review, M >