Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help wanted with NetFPGA-PLUS Reference Switch #6

Open
lukaszkwiatkowskii opened this issue Jul 3, 2023 · 1 comment
Open

Help wanted with NetFPGA-PLUS Reference Switch #6

lukaszkwiatkowskii opened this issue Jul 3, 2023 · 1 comment

Comments

@lukaszkwiatkowskii
Copy link

Hi.
I changed the project "reference switch" to seven ports: 0, 1, 2, 3, 4, 5 - normal ports, 6 - cpu port.
0 - src_port: 0x01, 1 - src_port: 0x02, 2 - src_port: 0x04, 3 - src_port: 0x08, 4 - src_port: 0x10, 5 - src_port: 0x20, 6 - src_port: 0x00,
0 - dst_port: 0x00, 1 - dst_port: 0x00, 2 - dst_port: 0x00, 3 - dst_port: 0x00, 4 - dst_port: 0x00, 5 - dst_port: 0x00, 6 - dst_port: 0x3f,

When I want to send packets from ports: 0,1,2,3,4,5 -> 6 it works fine, but when I want to send packets from port: 6 -> 0,1,2,3,4,5 it only sends to 0,1,4.

Changes:
input_arbiter.v - "assign next_queue = (cur_queue == NUM_QUEUES-1) ? 0 : cur_queue + 1;".
output_queues.v - "assign oq = s_axis_tuser[(DST_POS+(NUM_QUEUES-1)):DST_POS];".

@aomtoku
Copy link
Contributor

aomtoku commented Aug 26, 2023

Hi, I guess assuming you have 6 CMAC ports and 1 DMA interface on the pipeline.
You want to send a packet from host side and you expects packets to be sent to all 6 ports because any MAC addresses are not learned.
I am not sure but maybe you need to change this lines. Original codes supports two CMAC ports, so when the packet is missed on learning CAM, then missed packet is forwarded to default defined ports.
This explains why your packet is forwarded to 0,1 ports, but I am not sure why port 4 as well.
https://github.com/NetFPGA/NetFPGA-PLUS/blob/main/hw/lib/std/switch_output_port_lookup_v1_0_1/hdl/switch_output_port_lookup.v#L140

localparam DEFAULT_MISS_OUTPUT_PORTS = 8'h55; 

I hope this will be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants