net/vlan: fix issue of vlan pcp config #3308
Merged
+5
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fix a issue of vlan pcp config 3305
Impact
User can config vlan pcp when add it, and default pcp is 0
vconfig add eth0 10will create eth0.10 with VID=10 and no PCP(0)vconfig add eth0 10 3will create eth0.10 with VID=10 and PCP=3Testing
Open the compilation options CONFIG_NET_VLAN and CONFIG_NSH_DISABLE_VCONFIG.
Add a vlan interface withc comand:
vconfig add eth0 10 3; ifconfig eth0.10 192.168.10.2/24, config host vlan interface and ping from sim to host , then check pcp in packet.Change a pcp and check agin.