Skip to content

Commit ea5e554

Browse files
HoratiuVulturhefloryd
authored andcommitted
Update vcap syntax
With the latest kernel, the syntax for adding/removing vcap entries has been changed. Therefore update also the scripts to use new syntax. While at this update also the documentation.
1 parent 41ae6e7 commit ea5e554

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

doc/getting_started_LAN9662.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ log::
304304
ANA_RT_VLAN_PCP[1].PCP_MASK = 0x00000000 -> 0x000000ff
305305
ANA_RT_VLAN_PCP[1].VLAN_ID = 0x00000000 -> 0x00000000
306306
ANA_RT_VLAN_PCP[1].VLAN_PCP_ENA = 0x00000000 -> 0x00000001
307-
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
307+
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
308308
key field first: value: 0
309309
key field rt_vlan_idx: value: 01 mask: 07
310310
key field l2_mac: value: 8393162da912 mask: ffffffffffff
@@ -324,7 +324,7 @@ log::
324324
[0,32770,"DAP Port 2"] Set input data and IOPS. Size: 0 IOPS: GOOD
325325
[11,1,"Digital Input Port A"] Set input data and IOPS. Size: 4 IOPS: GOOD
326326
[12,1,"Digital Output Port A"] Set output IOCS: GOOD
327-
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
327+
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
328328
key field first: value: 0
329329
key field l2_mac: value: 8393162da912 mask: ffffffffffff
330330
key field rt_vlan_idx: value: 00 mask: 07

src/drivers/lan9662/add_inbound_vcap_rule.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ RTP_ID=$6
2626
RTP_SUBID=0
2727
RTE_INB_UPD=1
2828

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

3535
echo "$COMMAND"
3636
if ! $COMMAND; then

src/drivers/lan9662/add_outbound_vcap_rule.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ symreg ana_rt_vlan_pcp[$RT_VLAN_IDX].pcp_mask 0xff # Wildcard on pcp value
2929
symreg ana_rt_vlan_pcp[$RT_VLAN_IDX].vlan_id $VLAN_ID # Actual vid
3030
symreg ana_rt_vlan_pcp[$RT_VLAN_IDX].vlan_pcp_ena 1 # Enable entry
3131

32-
COMMAND="vcap add is1 $PRIORITY $VCAM_HANDLE \
33-
s1_rt first 0 \
34-
rt_vlan_idx $RT_VLAN_IDX 0x7 \
35-
l2_mac $DMAC ff:ff:ff:ff:ff:ff \
36-
rt_type 1 0x3 \
37-
rt_frmid $RT_FRMID 0xffff \
38-
s1_rt rtp_id $RTP_ID \
39-
fwd_ena 1 fwd_mask 0x10"
32+
COMMAND="vcap add $VCAM_HANDLE is1 $PRIORITY 0 \
33+
VCAP_KFS_RT \
34+
RT_VLAN_IDX $RT_VLAN_IDX 0x7 \
35+
L2_MAC $DMAC ff:ff:ff:ff:ff:ff \
36+
RT_TYPE 1 0x3 \
37+
RT_FRMID $RT_FRMID 0xffff \
38+
VCAP_AFS_S1_RT RTP_ID $RTP_ID \
39+
FWD_ENA 1 FWD_MASK 0x10"
4040

4141
echo "$COMMAND"
4242
if ! $COMMAND; then

src/drivers/lan9662/del_vcap_rule.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
PRIORITY=10
1010
VCAM_HANDLE=$1
1111

12-
COMMAND="vcap del is1 $PRIORITY $VCAM_HANDLE"
12+
COMMAND="vcap del $VCAM_HANDLE"
1313

1414
echo "$COMMAND"
1515
if ! $COMMAND; then

0 commit comments

Comments
 (0)