| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703 |
- // SPDX-License-Identifier: GPL-2.0
- /*
- * Driver for Marvell PPv2 network controller for Armada 375 SoC.
- *
- * Copyright (C) 2018 Marvell
- */
- #include <linux/kernel.h>
- #include <linux/slab.h>
- #include <linux/debugfs.h>
- #include "mvpp2.h"
- #include "mvpp2_prs.h"
- #include "mvpp2_cls.h"
- struct mvpp2_dbgfs_prs_entry {
- int tid;
- struct mvpp2 *priv;
- };
- struct mvpp2_dbgfs_flow_entry {
- int flow;
- struct mvpp2 *priv;
- };
- struct mvpp2_dbgfs_port_flow_entry {
- struct mvpp2_port *port;
- struct mvpp2_dbgfs_flow_entry *dbg_fe;
- };
- static int mvpp2_dbgfs_flow_flt_hits_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_dbgfs_flow_entry *entry = s->private;
- int id = MVPP2_FLOW_C2_ENTRY(entry->flow);
- u32 hits = mvpp2_cls_flow_hits(entry->priv, id);
- seq_printf(s, "%u\n", hits);
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_flow_flt_hits);
- static int mvpp2_dbgfs_flow_dec_hits_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_dbgfs_flow_entry *entry = s->private;
- u32 hits = mvpp2_cls_lookup_hits(entry->priv, entry->flow);
- seq_printf(s, "%u\n", hits);
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_flow_dec_hits);
- static int mvpp2_dbgfs_flow_type_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_dbgfs_flow_entry *entry = s->private;
- struct mvpp2_cls_flow *f;
- const char *flow_name;
- f = mvpp2_cls_flow_get(entry->flow);
- if (!f)
- return -EINVAL;
- switch (f->flow_type) {
- case IPV4_FLOW:
- flow_name = "ipv4";
- break;
- case IPV6_FLOW:
- flow_name = "ipv6";
- break;
- case TCP_V4_FLOW:
- flow_name = "tcp4";
- break;
- case TCP_V6_FLOW:
- flow_name = "tcp6";
- break;
- case UDP_V4_FLOW:
- flow_name = "udp4";
- break;
- case UDP_V6_FLOW:
- flow_name = "udp6";
- break;
- default:
- flow_name = "other";
- }
- seq_printf(s, "%s\n", flow_name);
- return 0;
- }
- static int mvpp2_dbgfs_flow_type_open(struct inode *inode, struct file *file)
- {
- return single_open(file, mvpp2_dbgfs_flow_type_show, inode->i_private);
- }
- static int mvpp2_dbgfs_flow_type_release(struct inode *inode, struct file *file)
- {
- struct seq_file *seq = file->private_data;
- struct mvpp2_dbgfs_flow_entry *flow_entry = seq->private;
- kfree(flow_entry);
- return single_release(inode, file);
- }
- static const struct file_operations mvpp2_dbgfs_flow_type_fops = {
- .open = mvpp2_dbgfs_flow_type_open,
- .read = seq_read,
- .release = mvpp2_dbgfs_flow_type_release,
- };
- static int mvpp2_dbgfs_flow_id_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_dbgfs_flow_entry *entry = s->private;
- struct mvpp2_cls_flow *f;
- f = mvpp2_cls_flow_get(entry->flow);
- if (!f)
- return -EINVAL;
- seq_printf(s, "%d\n", f->flow_id);
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_flow_id);
- static int mvpp2_dbgfs_port_flow_hash_opt_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_dbgfs_port_flow_entry *entry = s->private;
- struct mvpp2_port *port = entry->port;
- struct mvpp2_cls_flow_entry fe;
- struct mvpp2_cls_flow *f;
- int flow_index;
- u16 hash_opts;
- f = mvpp2_cls_flow_get(entry->dbg_fe->flow);
- if (!f)
- return -EINVAL;
- flow_index = MVPP2_PORT_FLOW_HASH_ENTRY(entry->port->id, f->flow_id);
- mvpp2_cls_flow_read(port->priv, flow_index, &fe);
- hash_opts = mvpp2_flow_get_hek_fields(&fe);
- seq_printf(s, "0x%04x\n", hash_opts);
- return 0;
- }
- static int mvpp2_dbgfs_port_flow_hash_opt_open(struct inode *inode,
- struct file *file)
- {
- return single_open(file, mvpp2_dbgfs_port_flow_hash_opt_show,
- inode->i_private);
- }
- static int mvpp2_dbgfs_port_flow_hash_opt_release(struct inode *inode,
- struct file *file)
- {
- struct seq_file *seq = file->private_data;
- struct mvpp2_dbgfs_port_flow_entry *flow_entry = seq->private;
- kfree(flow_entry);
- return single_release(inode, file);
- }
- static const struct file_operations mvpp2_dbgfs_port_flow_hash_opt_fops = {
- .open = mvpp2_dbgfs_port_flow_hash_opt_open,
- .read = seq_read,
- .release = mvpp2_dbgfs_port_flow_hash_opt_release,
- };
- static int mvpp2_dbgfs_port_flow_engine_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_dbgfs_port_flow_entry *entry = s->private;
- struct mvpp2_port *port = entry->port;
- struct mvpp2_cls_flow_entry fe;
- struct mvpp2_cls_flow *f;
- int flow_index, engine;
- f = mvpp2_cls_flow_get(entry->dbg_fe->flow);
- if (!f)
- return -EINVAL;
- flow_index = MVPP2_PORT_FLOW_HASH_ENTRY(entry->port->id, f->flow_id);
- mvpp2_cls_flow_read(port->priv, flow_index, &fe);
- engine = mvpp2_cls_flow_eng_get(&fe);
- seq_printf(s, "%d\n", engine);
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_port_flow_engine);
- static int mvpp2_dbgfs_flow_c2_hits_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_port *port = s->private;
- u32 hits;
- hits = mvpp2_cls_c2_hit_count(port->priv,
- MVPP22_CLS_C2_RSS_ENTRY(port->id));
- seq_printf(s, "%u\n", hits);
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_flow_c2_hits);
- static int mvpp2_dbgfs_flow_c2_rxq_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_port *port = s->private;
- struct mvpp2_cls_c2_entry c2;
- u8 qh, ql;
- mvpp2_cls_c2_read(port->priv, MVPP22_CLS_C2_RSS_ENTRY(port->id), &c2);
- qh = (c2.attr[0] >> MVPP22_CLS_C2_ATTR0_QHIGH_OFFS) &
- MVPP22_CLS_C2_ATTR0_QHIGH_MASK;
- ql = (c2.attr[0] >> MVPP22_CLS_C2_ATTR0_QLOW_OFFS) &
- MVPP22_CLS_C2_ATTR0_QLOW_MASK;
- seq_printf(s, "%d\n", (qh << 3 | ql));
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_flow_c2_rxq);
- static int mvpp2_dbgfs_flow_c2_enable_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_port *port = s->private;
- struct mvpp2_cls_c2_entry c2;
- int enabled;
- mvpp2_cls_c2_read(port->priv, MVPP22_CLS_C2_RSS_ENTRY(port->id), &c2);
- enabled = !!(c2.attr[2] & MVPP22_CLS_C2_ATTR2_RSS_EN);
- seq_printf(s, "%d\n", enabled);
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_flow_c2_enable);
- static int mvpp2_dbgfs_port_vid_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_port *port = s->private;
- unsigned char byte[2], enable[2];
- struct mvpp2 *priv = port->priv;
- struct mvpp2_prs_entry pe;
- unsigned long pmap;
- u16 rvid;
- int tid;
- for (tid = MVPP2_PRS_VID_PORT_FIRST(port->id);
- tid <= MVPP2_PRS_VID_PORT_LAST(port->id); tid++) {
- mvpp2_prs_init_from_hw(priv, &pe, tid);
- pmap = mvpp2_prs_tcam_port_map_get(&pe);
- if (!priv->prs_shadow[tid].valid)
- continue;
- if (!test_bit(port->id, &pmap))
- continue;
- mvpp2_prs_tcam_data_byte_get(&pe, 2, &byte[0], &enable[0]);
- mvpp2_prs_tcam_data_byte_get(&pe, 3, &byte[1], &enable[1]);
- rvid = ((byte[0] & 0xf) << 8) + byte[1];
- seq_printf(s, "%u\n", rvid);
- }
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_port_vid);
- static int mvpp2_dbgfs_port_parser_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_port *port = s->private;
- struct mvpp2 *priv = port->priv;
- struct mvpp2_prs_entry pe;
- unsigned long pmap;
- int i;
- for (i = 0; i < MVPP2_PRS_TCAM_SRAM_SIZE; i++) {
- mvpp2_prs_init_from_hw(port->priv, &pe, i);
- pmap = mvpp2_prs_tcam_port_map_get(&pe);
- if (priv->prs_shadow[i].valid && test_bit(port->id, &pmap))
- seq_printf(s, "%03d\n", i);
- }
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_port_parser);
- static int mvpp2_dbgfs_filter_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_port *port = s->private;
- struct mvpp2 *priv = port->priv;
- struct mvpp2_prs_entry pe;
- unsigned long pmap;
- int index, tid;
- for (tid = MVPP2_PE_MAC_RANGE_START;
- tid <= MVPP2_PE_MAC_RANGE_END; tid++) {
- unsigned char da[ETH_ALEN], da_mask[ETH_ALEN];
- if (!priv->prs_shadow[tid].valid ||
- priv->prs_shadow[tid].lu != MVPP2_PRS_LU_MAC ||
- priv->prs_shadow[tid].udf != MVPP2_PRS_UDF_MAC_DEF)
- continue;
- mvpp2_prs_init_from_hw(priv, &pe, tid);
- pmap = mvpp2_prs_tcam_port_map_get(&pe);
- /* We only want entries active on this port */
- if (!test_bit(port->id, &pmap))
- continue;
- /* Read mac addr from entry */
- for (index = 0; index < ETH_ALEN; index++)
- mvpp2_prs_tcam_data_byte_get(&pe, index, &da[index],
- &da_mask[index]);
- seq_printf(s, "%pM\n", da);
- }
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_filter);
- static int mvpp2_dbgfs_prs_lu_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_dbgfs_prs_entry *entry = s->private;
- struct mvpp2 *priv = entry->priv;
- seq_printf(s, "%x\n", priv->prs_shadow[entry->tid].lu);
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_prs_lu);
- static int mvpp2_dbgfs_prs_pmap_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_dbgfs_prs_entry *entry = s->private;
- struct mvpp2_prs_entry pe;
- unsigned int pmap;
- mvpp2_prs_init_from_hw(entry->priv, &pe, entry->tid);
- pmap = mvpp2_prs_tcam_port_map_get(&pe);
- pmap &= MVPP2_PRS_PORT_MASK;
- seq_printf(s, "%02x\n", pmap);
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_prs_pmap);
- static int mvpp2_dbgfs_prs_ai_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_dbgfs_prs_entry *entry = s->private;
- struct mvpp2_prs_entry pe;
- unsigned char ai, ai_mask;
- mvpp2_prs_init_from_hw(entry->priv, &pe, entry->tid);
- ai = pe.tcam[MVPP2_PRS_TCAM_AI_WORD] & MVPP2_PRS_AI_MASK;
- ai_mask = (pe.tcam[MVPP2_PRS_TCAM_AI_WORD] >> 16) & MVPP2_PRS_AI_MASK;
- seq_printf(s, "%02x %02x\n", ai, ai_mask);
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_prs_ai);
- static int mvpp2_dbgfs_prs_hdata_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_dbgfs_prs_entry *entry = s->private;
- struct mvpp2_prs_entry pe;
- unsigned char data[8], mask[8];
- int i;
- mvpp2_prs_init_from_hw(entry->priv, &pe, entry->tid);
- for (i = 0; i < 8; i++)
- mvpp2_prs_tcam_data_byte_get(&pe, i, &data[i], &mask[i]);
- seq_printf(s, "%*phN %*phN\n", 8, data, 8, mask);
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_prs_hdata);
- static int mvpp2_dbgfs_prs_sram_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_dbgfs_prs_entry *entry = s->private;
- struct mvpp2_prs_entry pe;
- mvpp2_prs_init_from_hw(entry->priv, &pe, entry->tid);
- seq_printf(s, "%*phN\n", 14, pe.sram);
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_prs_sram);
- static int mvpp2_dbgfs_prs_hits_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_dbgfs_prs_entry *entry = s->private;
- int val;
- val = mvpp2_prs_hits(entry->priv, entry->tid);
- if (val < 0)
- return val;
- seq_printf(s, "%d\n", val);
- return 0;
- }
- DEFINE_SHOW_ATTRIBUTE(mvpp2_dbgfs_prs_hits);
- static int mvpp2_dbgfs_prs_valid_show(struct seq_file *s, void *unused)
- {
- struct mvpp2_dbgfs_prs_entry *entry = s->private;
- struct mvpp2 *priv = entry->priv;
- int tid = entry->tid;
- seq_printf(s, "%d\n", priv->prs_shadow[tid].valid ? 1 : 0);
- return 0;
- }
- static int mvpp2_dbgfs_prs_valid_open(struct inode *inode, struct file *file)
- {
- return single_open(file, mvpp2_dbgfs_prs_valid_show, inode->i_private);
- }
- static int mvpp2_dbgfs_prs_valid_release(struct inode *inode, struct file *file)
- {
- struct seq_file *seq = file->private_data;
- struct mvpp2_dbgfs_prs_entry *entry = seq->private;
- kfree(entry);
- return single_release(inode, file);
- }
- static const struct file_operations mvpp2_dbgfs_prs_valid_fops = {
- .open = mvpp2_dbgfs_prs_valid_open,
- .read = seq_read,
- .release = mvpp2_dbgfs_prs_valid_release,
- };
- static int mvpp2_dbgfs_flow_port_init(struct dentry *parent,
- struct mvpp2_port *port,
- struct mvpp2_dbgfs_flow_entry *entry)
- {
- struct mvpp2_dbgfs_port_flow_entry *port_entry;
- struct dentry *port_dir;
- port_dir = debugfs_create_dir(port->dev->name, parent);
- if (IS_ERR(port_dir))
- return PTR_ERR(port_dir);
- /* This will be freed by 'hash_opts' release op */
- port_entry = kmalloc(sizeof(*port_entry), GFP_KERNEL);
- if (!port_entry)
- return -ENOMEM;
- port_entry->port = port;
- port_entry->dbg_fe = entry;
- debugfs_create_file("hash_opts", 0444, port_dir, port_entry,
- &mvpp2_dbgfs_port_flow_hash_opt_fops);
- debugfs_create_file("engine", 0444, port_dir, port_entry,
- &mvpp2_dbgfs_port_flow_engine_fops);
- return 0;
- }
- static int mvpp2_dbgfs_flow_entry_init(struct dentry *parent,
- struct mvpp2 *priv, int flow)
- {
- struct mvpp2_dbgfs_flow_entry *entry;
- struct dentry *flow_entry_dir;
- char flow_entry_name[10];
- int i, ret;
- sprintf(flow_entry_name, "%02d", flow);
- flow_entry_dir = debugfs_create_dir(flow_entry_name, parent);
- if (!flow_entry_dir)
- return -ENOMEM;
- /* This will be freed by 'type' release op */
- entry = kmalloc(sizeof(*entry), GFP_KERNEL);
- if (!entry)
- return -ENOMEM;
- entry->flow = flow;
- entry->priv = priv;
- debugfs_create_file("flow_hits", 0444, flow_entry_dir, entry,
- &mvpp2_dbgfs_flow_flt_hits_fops);
- debugfs_create_file("dec_hits", 0444, flow_entry_dir, entry,
- &mvpp2_dbgfs_flow_dec_hits_fops);
- debugfs_create_file("type", 0444, flow_entry_dir, entry,
- &mvpp2_dbgfs_flow_type_fops);
- debugfs_create_file("id", 0444, flow_entry_dir, entry,
- &mvpp2_dbgfs_flow_id_fops);
- /* Create entry for each port */
- for (i = 0; i < priv->port_count; i++) {
- ret = mvpp2_dbgfs_flow_port_init(flow_entry_dir,
- priv->port_list[i], entry);
- if (ret)
- return ret;
- }
- return 0;
- }
- static int mvpp2_dbgfs_flow_init(struct dentry *parent, struct mvpp2 *priv)
- {
- struct dentry *flow_dir;
- int i, ret;
- flow_dir = debugfs_create_dir("flows", parent);
- if (!flow_dir)
- return -ENOMEM;
- for (i = 0; i < MVPP2_N_FLOWS; i++) {
- ret = mvpp2_dbgfs_flow_entry_init(flow_dir, priv, i);
- if (ret)
- return ret;
- }
- return 0;
- }
- static int mvpp2_dbgfs_prs_entry_init(struct dentry *parent,
- struct mvpp2 *priv, int tid)
- {
- struct mvpp2_dbgfs_prs_entry *entry;
- struct dentry *prs_entry_dir;
- char prs_entry_name[10];
- if (tid >= MVPP2_PRS_TCAM_SRAM_SIZE)
- return -EINVAL;
- sprintf(prs_entry_name, "%03d", tid);
- prs_entry_dir = debugfs_create_dir(prs_entry_name, parent);
- if (!prs_entry_dir)
- return -ENOMEM;
- /* The 'valid' entry's ops will free that */
- entry = kmalloc(sizeof(*entry), GFP_KERNEL);
- if (!entry)
- return -ENOMEM;
- entry->tid = tid;
- entry->priv = priv;
- /* Create each attr */
- debugfs_create_file("sram", 0444, prs_entry_dir, entry,
- &mvpp2_dbgfs_prs_sram_fops);
- debugfs_create_file("valid", 0644, prs_entry_dir, entry,
- &mvpp2_dbgfs_prs_valid_fops);
- debugfs_create_file("lookup_id", 0644, prs_entry_dir, entry,
- &mvpp2_dbgfs_prs_lu_fops);
- debugfs_create_file("ai", 0644, prs_entry_dir, entry,
- &mvpp2_dbgfs_prs_ai_fops);
- debugfs_create_file("header_data", 0644, prs_entry_dir, entry,
- &mvpp2_dbgfs_prs_hdata_fops);
- debugfs_create_file("hits", 0444, prs_entry_dir, entry,
- &mvpp2_dbgfs_prs_hits_fops);
- return 0;
- }
- static int mvpp2_dbgfs_prs_init(struct dentry *parent, struct mvpp2 *priv)
- {
- struct dentry *prs_dir;
- int i, ret;
- prs_dir = debugfs_create_dir("parser", parent);
- if (!prs_dir)
- return -ENOMEM;
- for (i = 0; i < MVPP2_PRS_TCAM_SRAM_SIZE; i++) {
- ret = mvpp2_dbgfs_prs_entry_init(prs_dir, priv, i);
- if (ret)
- return ret;
- }
- return 0;
- }
- static int mvpp2_dbgfs_port_init(struct dentry *parent,
- struct mvpp2_port *port)
- {
- struct dentry *port_dir;
- port_dir = debugfs_create_dir(port->dev->name, parent);
- if (IS_ERR(port_dir))
- return PTR_ERR(port_dir);
- debugfs_create_file("parser_entries", 0444, port_dir, port,
- &mvpp2_dbgfs_port_parser_fops);
- debugfs_create_file("mac_filter", 0444, port_dir, port,
- &mvpp2_dbgfs_filter_fops);
- debugfs_create_file("vid_filter", 0444, port_dir, port,
- &mvpp2_dbgfs_port_vid_fops);
- debugfs_create_file("c2_hits", 0444, port_dir, port,
- &mvpp2_dbgfs_flow_c2_hits_fops);
- debugfs_create_file("default_rxq", 0444, port_dir, port,
- &mvpp2_dbgfs_flow_c2_rxq_fops);
- debugfs_create_file("rss_enable", 0444, port_dir, port,
- &mvpp2_dbgfs_flow_c2_enable_fops);
- return 0;
- }
- void mvpp2_dbgfs_cleanup(struct mvpp2 *priv)
- {
- debugfs_remove_recursive(priv->dbgfs_dir);
- }
- void mvpp2_dbgfs_init(struct mvpp2 *priv, const char *name)
- {
- struct dentry *mvpp2_dir, *mvpp2_root;
- int ret, i;
- mvpp2_root = debugfs_lookup(MVPP2_DRIVER_NAME, NULL);
- if (!mvpp2_root) {
- mvpp2_root = debugfs_create_dir(MVPP2_DRIVER_NAME, NULL);
- if (IS_ERR(mvpp2_root))
- return;
- }
- mvpp2_dir = debugfs_create_dir(name, mvpp2_root);
- if (IS_ERR(mvpp2_dir))
- return;
- priv->dbgfs_dir = mvpp2_dir;
- ret = mvpp2_dbgfs_prs_init(mvpp2_dir, priv);
- if (ret)
- goto err;
- for (i = 0; i < priv->port_count; i++) {
- ret = mvpp2_dbgfs_port_init(mvpp2_dir, priv->port_list[i]);
- if (ret)
- goto err;
- }
- ret = mvpp2_dbgfs_flow_init(mvpp2_dir, priv);
- if (ret)
- goto err;
- return;
- err:
- mvpp2_dbgfs_cleanup(priv);
- }
|