Skip to content

Conversation

@jersey99
Copy link
Collaborator

A working ping and UDP on both HW and sim on verilator tun/tap over 2 VLAN tags and IPs.
See bench/sim_xgmii_vlan.py

Currently adding a VLAN tag sets up a new port on a newly added MACVLANCrossbar, with a new IP in that virtual network. This can be modded in the future upon necessity and add more IP addresses within the network.

common.py: Add vlan header related things
core/init.py: Adds a separate instantiator for VLANs LiteEthVLANUDPIPCore
core/{arp/ip}.py: Facilitate the necessary VLAN related modifications
mac/common.py: Update the get_port method of the crossbar to support a fancier dispatcher
liteeth/packet.py: VLAN header is 4 bytes, this is smaller than 8 byte dw of xgmii, so necessary changes to handle packet headers that are less than datawidth are in here. Note that header_words == 0 codepath is basically independent from the previous code, and the new packet.py is backwards compatible.

jersey99 added 2 commits May 24, 2023 13:56
A working ping and UDP on both HW and sim on verilator tun/tap over 2 VLAN tags and IPs.
See bench/sim_xgmii_vlan.py

Currently adding a VLAN tag sets up a new port on a newly added MACVLANCrossbar, with a new IP in that virtual network. This can be modded in the future upon necessity and add more IP addresses within the network.

common.py: Add vlan header related things
core/__init__.py: Adds a separate instantiator for VLANs LiteEthVLANUDPIPCore
core/{arp/ip}.py: Facilitate the necessary VLAN related modifications
mac/common.py: Update the get_port method of the crossbar to support a fancier dispatcher
liteeth/packet.py: VLAN header is 4 bytes, this is smaller than 8 byte dw of xgmii, so necessary changes to handle packet headers that are less than datawidth are in here. Note that header_words == 0 codepath is basically independent from the previous code, and the new packet.py is backwards compatible.
@jersey99 jersey99 requested a review from enjoy-digital May 24, 2023 21:22
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

Successfully merging this pull request may close these issues.

1 participant