Skip to content

Add more commands for VSC9953 L2 Switch

York Sun u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest2 of 16 patches 0 repliesNew

2 of 16 patches are in this archive. The cover letter announces 16.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16drivers/net/vsc9953: Remove 'CONFIG_' from macros' name+0 -01 reply
1/16drivers/net/vsc9953: Remove 'CONFIG_' from macros' name+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [U-Boot] [PATCH v3 00/16] Add more commands for VSC9953 L2 Switch
Quoted 57 lines · Codrin Ciubotariu

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

Quoted 9 lines

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

This set with updated patches are applied to fsl-qoriq master, awaiting upstream.

[PATCH v4 11/16] common/env_flags.c: Add function to validate a MAC address
- function eth_validate_ethaddr_str() has been moved to common/env_flags.c and its header to include/env_flags.h;
- patch desription updated;
[PATCH v4 12/16] drivers/net/vsc9953: Add commands to manipulate the FDB for VSC9953

	- eth_validate_ethaddr_str() is now declared in include/env_flags.h instead
	of include/net.h so we have to include net.h instead of env_flags.h;

York