DPDK patches and discussions
 help / color / mirror / Atom feed
From: Mike Pattrick <mkp@redhat.com>
To: Ferruh Yigit <ferruh.yigit@amd.com>
Cc: Aman Singh <aman.deep.singh@intel.com>,
	Yuying Zhang <yuying.zhang@intel.com>,
	ktraynor@redhat.com, dev@dpdk.org
Subject: Re: [PATCH v5] app/testpmd: expand noisy neighbour forward mode support
Date: Wed, 7 Jun 2023 11:42:18 -0400	[thread overview]
Message-ID: <CAHcdBH4d=12FM82hNtshs8SkzfPXR0FkMJeH+aqjMBnV+dkyyQ@mail.gmail.com> (raw)
In-Reply-To: <b864ba31-f797-2958-6b7b-585dab5c362e@amd.com>

On Tue, Jun 6, 2023 at 6:23 PM Ferruh Yigit <ferruh.yigit@amd.com> 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 <mkp@redhat.com>
> >  ---
> >  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 == NOISY_FWD_MODE_IO)
> > +             noisy_vnf_engine.packet_fwd = pkt_burst_io;
> > +     else if (noisy_fwd_mode == NOISY_FWD_MODE_MAC)
> > +             noisy_vnf_engine.packet_fwd = pkt_burst_mac;
> > +     else if (noisy_fwd_mode == NOISY_FWD_MODE_MACSWAP)
> > +             noisy_vnf_engine.packet_fwd = pkt_burst_macswap;
> > +     else if (noisy_fwd_mode == NOISY_FWD_MODE_5TSWAP)
> > +             noisy_vnf_engine.packet_fwd = 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 = {
> >       .fwd_mode_name  = "noisy",
> >       .port_fwd_begin = noisy_fwd_begin,
> >       .port_fwd_end   = noisy_fwd_end,
> > -     .stream_init    = common_fwd_stream_init,
> > -     .packet_fwd     = pkt_burst_noisy_vnf,
> > +     .stream_init    = common_fwd_stream_init,
> > +     .packet_fwd     = 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 mempool\n"
> >              "    xmemhuge: use anonymous hugepage memory to create and populate mempool\n");
> > +     printf("  --noisy-fwd-mode=<io|mac|macswap|5tswap>: set the sub-fwd mode, defaults to io\n");
>
> Main forwarding parameter is '--forward-mode=N', 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=N'?
>
>
> >       printf("  --noisy-tx-sw-buffer-size=N: size of FIFO buffer\n");
> >       printf("  --noisy-tx-sw-buffer-flushtime=N: flush FIFO after N ms\n");
> >       printf("  --noisy-lkup-memory=N: 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

>


  reply	other threads:[~2023-06-07 15:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 18:55 [PATCH v3] " Mike Pattrick
2023-05-26 15:34 ` Kevin Traynor
2023-05-26 17:32   ` Mike Pattrick
2023-06-01 16:23     ` Kevin Traynor
2023-06-06 14:17       ` Ferruh Yigit
2023-06-02 18:29 ` [PATCH v4] " Mike Pattrick
2023-06-06 14:27   ` Ferruh Yigit
2023-06-06 21:12   ` [PATCH v5] " Mike Pattrick
2023-06-06 21:37     ` Ferruh Yigit
2023-06-06 21:42       ` Ferruh Yigit
2023-06-06 22:23     ` Ferruh Yigit
2023-06-07 15:42       ` Mike Pattrick [this message]
2023-06-08  9:59     ` [PATCH v6] " Mike Pattrick
2023-06-08 10:25       ` Ferruh Yigit
2023-06-08 10:43         ` Mike Pattrick
2023-06-08 11:42           ` Ferruh Yigit
2023-06-08 13:31       ` [PATCH v7] " Mike Pattrick
2023-06-08 14:32         ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHcdBH4d=12FM82hNtshs8SkzfPXR0FkMJeH+aqjMBnV+dkyyQ@mail.gmail.com' \
    --to=mkp@redhat.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=ktraynor@redhat.com \
    --cc=yuying.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).