From: Jack Min <jackmin@mellanox.com> To: Jerin Jacob <jerinjacobk@gmail.com> Cc: Slava Ovsiienko <viacheslavo@mellanox.com>, Matan Azrad <matan@mellanox.com>, Raslan Darawsheh <rasland@mellanox.com>, Wenzhuo Lu <wenzhuo.lu@intel.com>, Jingjing Wu <jingjing.wu@intel.com>, Bernard Iremonger <bernard.iremonger@intel.com>, Adrien Mazarguil <adrien.mazarguil@6wind.com>, Ori Kam <orika@mellanox.com>, dpdk-dev <dev@dpdk.org>, "Xueming(Steven) Li" <xuemingl@mellanox.com> Subject: Re: [dpdk-dev] [RFC 2/4] app/testpmd: new flow dump CLI Date: Wed, 15 Jan 2020 12:49:17 +0000 Message-ID: <20200115124857.leukic5pfpybzilg@mellanox.com> (raw) In-Reply-To: <CALBAE1MmDN0VwuWKmuCTg_xryyh1FNfqbhOV_satEYRzOZKuSQ@mail.gmail.com> On Tue, 20-01-14, 19:30, Jerin Jacob wrote: > On Tue, Jan 14, 2020 at 3:45 PM Jack Min <jackmin@mellanox.com> wrote: > > > > On Tue, 20-01-14, 10:01, Jerin Jacob wrote: > > > On Tue, Jan 14, 2020 at 9:15 AM Xiaoyu Min <jackmin@mellanox.com> wrote: > > > > > > > > From: Xueming Li <xuemingl@mellanox.com> > > > > > > > > New flow dump CLI to dump MLX5 PMD specific flows into screen. > > > > > > > > Signed-off-by: Xueming Li <xuemingl@mellanox.com> > > > > Signed-off-by: Xiaoyu Min <jackmin@mellanox.com> > > > > --- > > > > app/test-pmd/Makefile | 4 ++ > > > > app/test-pmd/cmdline_flow.c | 91 +++++++++++++++++++++++++++++++++++++ > > > > app/test-pmd/config.c | 33 ++++++++++++++ > > > > app/test-pmd/meson.build | 3 ++ > > > > app/test-pmd/testpmd.h | 1 + > > > > 5 files changed, 132 insertions(+) > > > > > > > > > > > > > > > +/** Dump all flow rules. */ > > > > +int > > > > +port_flow_dump(portid_t port_id __rte_unused, > > > > + const char *file_name __rte_unused) > > > > +{ > > > > + int ret = 0; > > > > +#ifdef RTE_LIBRTE_MLX5_PMD > > > > > > IMO, It should be the last resort to add driver-specific symbols in testpmd. > > > Why not introduce rte_flow_dump() and hook the MLX driver underneath? > > > > > Hey Jerin, > > Hi Jack. > > > > > Thanks for you comments. > > > > What my understanding is this flow dump is very Mellanox specific, it will dump > > all flows in Mellanox HW using Mellanox format. They are hardware flows in > > short, which are different from rte flow. > > We do have a similar API for other drivers to represent the internal info. > I think, similar API[1] would suffice for your case. We should not > standardize the output of dump, instead, it will provide a generic API > to dump the internal representation of flow HW to file/stdout. > > Octeontx2 MACM HW (rte_flow) has similar internal information, > We could implement the driver API if it is a generic API. Yes, a generic rte_flow API (as similar as [1])can benifit both of us. :-) I'll propose a new rte_flow API for this in v2. Thanks, -Jack > > [1] > See the below example for eventdev driver. > > /** > * Dump internal information about *dev_id* to the FILE* provided in *f*. > * > * @param dev_id > * The identifier of the device. > * > * @param f > * A pointer to a file for output > * > * @return > * - 0: on success > * - <0: on failure. > */ > int > rte_event_dev_dump(uint8_t dev_id, FILE *f); > > > > > > I don't know whether other vendor has the similar functionality and needs > > so an rte flow level API could be helpful. > > > > And basically rte flow API is based on rte_flow, a dump function probabily means > > dump rte_flow itself (i.e flow->attr, pattern, actions). > > > > This is the reason a private API is choosen and driver-specific symbols added > > in testpmd as result. > > > > -Jack
next prev parent reply other threads:[~2020-01-15 12:49 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-01-14 3:45 [dpdk-dev] [RFC 0/4] net/mlx5: dump software steering flows in HW Xiaoyu Min 2020-01-14 3:45 ` [dpdk-dev] [RFC 1/4] net/mlx5: support flow dump Api Xiaoyu Min 2020-01-14 3:45 ` [dpdk-dev] [RFC 2/4] app/testpmd: new flow dump CLI Xiaoyu Min 2020-01-14 4:31 ` Jerin Jacob 2020-01-14 10:15 ` Jack Min 2020-01-14 14:00 ` Jerin Jacob 2020-01-15 12:49 ` Jack Min [this message] 2020-01-14 3:45 ` [dpdk-dev] [RFC 3/4] net/mlx5: add socket server for external tools Xiaoyu Min 2020-01-14 3:45 ` [dpdk-dev] [RFC 4/4] doc: update mlx5 document for flow dump feature Xiaoyu Min
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=20200115124857.leukic5pfpybzilg@mellanox.com \ --to=jackmin@mellanox.com \ --cc=adrien.mazarguil@6wind.com \ --cc=bernard.iremonger@intel.com \ --cc=dev@dpdk.org \ --cc=jerinjacobk@gmail.com \ --cc=jingjing.wu@intel.com \ --cc=matan@mellanox.com \ --cc=orika@mellanox.com \ --cc=rasland@mellanox.com \ --cc=viacheslavo@mellanox.com \ --cc=wenzhuo.lu@intel.com \ --cc=xuemingl@mellanox.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
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git