Skip to content

Commit d091ec9

Browse files
committed
Merge branch 'dsa-felix-psfp'
Xiaoliang Yang says: ==================== net: dsa: felix: psfp support on vsc9959 VSC9959 hardware supports Per-Stream Filtering and Policing(PSFP). This patch series add PSFP support on tc flower offload of ocelot driver. Use chain 30000 to distinguish PSFP from VCAP blocks. Add gate and police set to support PSFP in VSC9959 driver. v6-v7 changes: - Add a patch to restrict psfp rules on ingress port. - Using stats.drops to show the packet count discarded by the rule. v5->v6 changes: - Modify ocelot_mact_lookup() parameters. - Use parameters ssid and sfid instead of streamdata in ocelot_mact_learn_streamdata() function. - Serialize STREAMDATA and MAC table write. v4->v5 changes: - Add MAC table lock patch, and move stream data write in ocelot_mact_learn_streamdata(). - Add two sections of VCAP policers to Seville platform. v3->v4 changes: - Introduce vsc9959_psfp_sfi_table_get() function in patch where it is used to fix compile warning. v2->v3 changes: - Reorder first two patches. Export struct ocelot_mact_entry, then add ocelot_mact_lookup() and ocelot_mact_write() functions. - Add PSFP list to struct ocelot, and init it by using ocelot->ops->psfp_init(). v1->v2 changes: - Use tc flower offload of ocelot driver to support PSFP add and delete. - Add PSFP tables add/del functions in felix_vsc9959.c. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents f6ef47e + a7e13ed commit d091ec9

File tree

12 files changed

+1114
-72
lines changed

12 files changed

+1114
-72
lines changed

drivers/net/dsa/ocelot/felix.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,10 @@ static int felix_init_structs(struct felix *felix, int num_phys_ports)
989989
ocelot->num_stats = felix->info->num_stats;
990990
ocelot->num_mact_rows = felix->info->num_mact_rows;
991991
ocelot->vcap = felix->info->vcap;
992+
ocelot->vcap_pol.base = felix->info->vcap_pol_base;
993+
ocelot->vcap_pol.max = felix->info->vcap_pol_max;
994+
ocelot->vcap_pol.base2 = felix->info->vcap_pol_base2;
995+
ocelot->vcap_pol.max2 = felix->info->vcap_pol_max2;
992996
ocelot->ops = felix->info->ops;
993997
ocelot->npi_inj_prefix = OCELOT_TAG_PREFIX_SHORT;
994998
ocelot->npi_xtr_prefix = OCELOT_TAG_PREFIX_SHORT;

drivers/net/dsa/ocelot/felix.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ struct felix_info {
2121
int num_ports;
2222
int num_tx_queues;
2323
struct vcap_props *vcap;
24+
u16 vcap_pol_base;
25+
u16 vcap_pol_max;
26+
u16 vcap_pol_base2;
27+
u16 vcap_pol_max2;
2428
int switch_pci_bar;
2529
int imdio_pci_bar;
2630
const struct ptp_clock_info *ptp_caps;

0 commit comments

Comments
 (0)