Modify

Opened 3 years ago

Closed 3 years ago

#19105 closed enhancement (not_a_bug)

Allow for more flexible port mirroring on ar8xxxx switches

Reported by: squidevil Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: switch, mirror Cc:

Description

The current mirror_monitor_port/mirror_source_port feature in the ar8216.c driver for ar8216 and ar8327 network switches isn't as flexible as the base hardware allows. Currently, mirroring is restricted to packets rx/tx/both at one port to one other port. The switch itself allows the tx/rx from any combination of ports to be mirrored to the monitor_port.

I've pulled together a patch for the ar8216.c driver that enables this. Commands like this can now be run, which mirrors any packet received on port 4 or port 5 to port 0:

swconfig dev switch0 set mirror_monitor_port 0
swconfig dev switch0 port 4 set enable_mirror_rx 1
swconfig dev switch0 port 5 set enable_mirror_rx 1

Corresponding changes to the network switch setup bash scripts would need to be made as well.

It looks like the source_port/mirror_port concept came from the rtl8366rb.c driver, whose hardware appears to only support the single source port. I elected not to support the older mirror_source_port (and its associated switch-level enable_mirror_rx/enable_mirror_tx options). It would be fairly easy to add those back into the driver and support both syntaxes, but I thought it important to get this request looked at before bothering with the additional work. I'll let the other maintainers/developers provide an opinion, first.

Attachments (1)

ar8xxx_multi_mirror.patch (9.7 KB) - added by squidevil 3 years ago.
Suggested patch

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by squidevil

Suggested patch

comment:1 Changed 3 years ago by jow

  • Resolution set to not_a_bug
  • Status changed from new to closed

Please send a proper patch according to SubmittingPatches to the development list.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.