Skip to content

Update vcap syntax #569

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

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/getting_started_LAN9662.rst
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ log::
ANA_RT_VLAN_PCP[1].PCP_MASK = 0x00000000 -> 0x000000ff
ANA_RT_VLAN_PCP[1].VLAN_ID = 0x00000000 -> 0x00000000
ANA_RT_VLAN_PCP[1].VLAN_PCP_ENA = 0x00000000 -> 0x00000001
vcap add is1 10 3 s1_rt first 0 rt_vlan_idx 1 0x7 l2_mac 12:A9:2D:16:93:83 ff:ff:ff:ff:ff:ff rt_type 1 0x3 rt_frmid 32769 0xffff s1_rt rtp_id 5 fwd_ena 1 fwd_mas0
vcap add 10000 is1 10 0 VCAP_KFS_RT RT_VLAN_IDX 1 0x7 L2_MAC 12:A9:2D:16:93:83 ff:ff:ff:ff:ff:ff RT_TYPE 1 0x3 RT_FRMID 32769 0xffff VCAP_AFS_S1_RT RTP_ID 5 FWD_ENA 1 FWD_MASK 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not match with the updated script. FWD_MASK is 0x10 in the script.
Additionally the vcam_handle is not what I expect.

key field first: value: 0
key field rt_vlan_idx: value: 01 mask: 07
key field l2_mac: value: 8393162da912 mask: ffffffffffff
Expand All @@ -324,7 +324,7 @@ log::
[0,32770,"DAP Port 2"] Set input data and IOPS. Size: 0 IOPS: GOOD
[11,1,"Digital Input Port A"] Set input data and IOPS. Size: 4 IOPS: GOOD
[12,1,"Digital Output Port A"] Set output IOCS: GOOD
vcap add is1 10 2 s1_rt first 0 l2_mac 12:A9:2D:16:93:83 ff:ff:ff:ff:ff:ff rt_vlan_idx 0 0x7 rt_frmid 32768 0xffff s1_rt rtp_id 4 rtp_subid 0 rte_inb_upd 1 fwd_e0
vcap add 10001 is1 10 0 VCAP_KFS_RT L2_MAC 12:A9:2D:16:93:83 ff:ff:ff:ff:ff:ff RT_VLAN_IDX 0 0x7 RT_FRMID 32768 0xffff VCAP_AFS_S1_RT RTP_ID 4 RTP_SUBID 0 RTE_INB_UPD 1 FWD_ENA 1 FWD_MASK 0x10
key field first: value: 0
key field l2_mac: value: 8393162da912 mask: ffffffffffff
key field rt_vlan_idx: value: 00 mask: 07
Expand Down
10 changes: 5 additions & 5 deletions src/drivers/lan9662/add_inbound_vcap_rule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ RTP_ID=$6
RTP_SUBID=0
RTE_INB_UPD=1

COMMAND="vcap add is1 $PRIORITY $VCAM_HANDLE \
s1_rt first 0 l2_mac $DMAC ff:ff:ff:ff:ff:ff \
rt_vlan_idx $RT_VLAN_IDX 0x7 rt_frmid $RT_FRMID 0xffff \
s1_rt rtp_id $RTP_ID rtp_subid $RTP_SUBID \
rte_inb_upd $RTE_INB_UPD fwd_ena 1 fwd_mask 0x10"
COMMAND="vcap add $VCAM_HANDLE is1 $PRIORITY 0 \
VCAP_KFS_RT L2_MAC $DMAC ff:ff:ff:ff:ff:ff \
RT_VLAN_IDX $RT_VLAN_IDX 0x7 RT_FRMID $RT_FRMID 0xffff \
VCAP_AFS_S1_RT RTP_ID $RTP_ID RTP_SUBID $RTP_SUBID \
RTE_INB_UPD $RTE_INB_UPD FWD_ENA 1 FWD_MASK 0x10"

echo "$COMMAND"
if ! $COMMAND; then
Expand Down
16 changes: 8 additions & 8 deletions src/drivers/lan9662/add_outbound_vcap_rule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ symreg ana_rt_vlan_pcp[$RT_VLAN_IDX].pcp_mask 0xff # Wildcard on pcp value
symreg ana_rt_vlan_pcp[$RT_VLAN_IDX].vlan_id $VLAN_ID # Actual vid
symreg ana_rt_vlan_pcp[$RT_VLAN_IDX].vlan_pcp_ena 1 # Enable entry

COMMAND="vcap add is1 $PRIORITY $VCAM_HANDLE \
s1_rt first 0 \
rt_vlan_idx $RT_VLAN_IDX 0x7 \
l2_mac $DMAC ff:ff:ff:ff:ff:ff \
rt_type 1 0x3 \
rt_frmid $RT_FRMID 0xffff \
s1_rt rtp_id $RTP_ID \
fwd_ena 1 fwd_mask 0x10"
COMMAND="vcap add $VCAM_HANDLE is1 $PRIORITY 0 \
VCAP_KFS_RT \
RT_VLAN_IDX $RT_VLAN_IDX 0x7 \
L2_MAC $DMAC ff:ff:ff:ff:ff:ff \
RT_TYPE 1 0x3 \
RT_FRMID $RT_FRMID 0xffff \
VCAP_AFS_S1_RT RTP_ID $RTP_ID \
FWD_ENA 1 FWD_MASK 0x10"

echo "$COMMAND"
if ! $COMMAND; then
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/lan9662/del_vcap_rule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
PRIORITY=10
VCAM_HANDLE=$1

COMMAND="vcap del is1 $PRIORITY $VCAM_HANDLE"
COMMAND="vcap del $VCAM_HANDLE"

echo "$COMMAND"
if ! $COMMAND; then
Expand Down