[U-Boot] [PATCH v3 00/16] Add more commands for VSC9953 L2 Switch

Codrin Ciubotariu codrin.ciubotariu at freescale.com
Fri Jul 24 15:52:43 CEST 2015


This patch set adds several features for VSC9953 L2 Switch:
	- VLAN configuration;
	- port statistics;
	- FDB table operations;
	- enable/disable HW learning;
	- private/shared VLAN learning.

Also, the parser needed to be changed to allow commands with optional parameters and to allow developers to easily add new commands. This set also creates a parser with generic commands for L2 Ethernet Switche drivers.

Since new features are added, the default configuration had to be changed to:
	- HW learning enabled on all ports; (HW default)
	- All ports are in VLAN 1;
	- All ports are VLAN aware;
	- All ports have POP_COUNT 1;
	- All ports have PVID 1;
	- All ports have TPID 0x8100; (HW default)
	- All ports tag frames classified to all VLANs that are not PVID;

If the user decides to compile the VSC9953 driver without the support for commands, the above default configuration should be sufficient to make the L2 Switch work in unmanaged mode.

New supported commands:
	- show a port's statistics;
	- enable/disable/show learning configuration on a port;
	- add/delete a MAC entry in FDB; show the FDB table;
	- add/remove a VLAN to/from a port (VLAN members);
	- set/show PVID (ingress and egress VLAN tagging) for a port;
	- set egress tagging mod for a port;
	- configure VID source for egress tag;
	- make VLAN learning shared or private;
	- enable/disable VLAN ingress filtering on a port.

Changes for v2:
	- removed Change-id field;
	- Added the patch that changes the License
	at the end of the patch set for an easier
	integration;

Changes for v3:
	- added a patch that creates a parser with generic commands for Ethernet switch drivers
	- added a patch that adds new functions for working with bitfields;
	- added a patch that exports a function that verifies if a string has the format of a MAC address
	- added a patch to rename macros from vsc9953.h that started with "CONFIG_"
	- added a patch with a bug fix fdone in the Cleanup patch
	- all patches declare each variable on a line, without using tabs
	- in the parser, the MAC address is no longer remembered dynamically, but statically
	- the parser now returns CMD_RET_* macros instead of 1 and 0
	- small code fixes

Codrin Ciubotariu (16):
  drivers/net/vsc9953: Remove 'CONFIG_' from macros' name
  drivers/net/vsc9953: Cleanup patch
  drivers/net/vsc9953: Fix bug when enabling a port
  drivers/net/vsc9953: Fix missing reserved register
  include/bitfield: Add new bitfield operations
  drivers/net/vsc9953: Add default configuration for VSC9953 L2 Switch
  common/cmd_ethsw: Add generic commands for Ethernet Switches
  drivers/net/vsc9953: Use the generic Ethernet Switch parser
  drivers/net/vsc9953: Add command to show/clear port counters
  drivers/net/vsc9953: Add commands to enable/disable HW learning
  net/eth.c: Add function to validate a MAC address
  drivers/net/vsc9953: Add commands to manipulate the FDB for VSC9953
  drivers/net/vsc9953: Add VLAN commands for VSC9953
  drivers/net/vsc9953: Add command for shared/private VLAN learning
  drivers/net/vsc9953: Add commands for VLAN ingress filtering
  drivers/net/vsc9953: Add GPL-2.0+ SPDX-License-Identifier

 common/Makefile            |    1 +
 common/cmd_ethsw.c         | 1025 ++++++++++++++++++++
 common/env_flags.c         |   15 +-
 drivers/net/vsc9953.c      | 2247 +++++++++++++++++++++++++++++++++++++++-----
 include/bitfield.h         |   32 +
 include/configs/T104xRDB.h |    2 +-
 include/ethsw.h            |   95 ++
 include/net.h              |    1 +
 include/vsc9953.h          |  389 ++++++--
 net/eth.c                  |   30 +
 10 files changed, 3502 insertions(+), 335 deletions(-)
 create mode 100644 common/cmd_ethsw.c
 create mode 100644 include/ethsw.h

-- 
1.9.3



More information about the U-Boot mailing list