Skip to content

Commit

Permalink
json/shell: Add preliminary ASL support
Browse files Browse the repository at this point in the history
This is a placeholder for ASL support.
As per now ASL will have the same configuration as ADL-N.

Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com>
  • Loading branch information
JunAnnLaiIntel authored and ws-intel committed Dec 18, 2023
1 parent f5b5827 commit a63d850
Show file tree
Hide file tree
Showing 11 changed files with 441 additions and 1 deletion.
21 changes: 21 additions & 0 deletions json/asl/opcua-A.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

###############################################################################
# Phase: Init

IFACE_MAC_ADDR="aa:00:aa:00:aa:00"

IFACE_IP_ADDR="169.254.1.11"
IFACE_BRC_ADDR="169.254.1.255"

IFACE_VLAN_IP_ADDR="169.254.11.11"
IFACE_VLAN_BRC_ADDR="169.254.11.255"
IFACE_VLAN_ID="3"

TX_Q_COUNT=4
RX_Q_COUNT=4

# ADLN SKU6 - has 4 cores - comment out accordingly
IRQ_AFFINITY_FILE="irq_affinity_4c_4tx_4rx.map"
# ADLN SKU5 - has only 2 cores - comment out accordingly
#IRQ_AFFINITY_FILE="irq_affinity_2c_4tx_4rx.map"
21 changes: 21 additions & 0 deletions json/asl/opcua-B.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

###############################################################################
# Phase: Init

IFACE_MAC_ADDR="22:bb:22:bb:22:bb"

IFACE_IP_ADDR="169.254.1.22"
IFACE_BRC_ADDR="169.254.1.255"

IFACE_VLAN_IP_ADDR="169.254.11.22"
IFACE_VLAN_BRC_ADDR="169.254.11.255"
IFACE_VLAN_ID="3"

TX_Q_COUNT=4
RX_Q_COUNT=4

# ADLN SKU6 - has 4 cores - comment out accordingly
IRQ_AFFINITY_FILE="irq_affinity_4c_4tx_4rx.map"
# ADLN SKU5 - has only 2 cores - comment out accordingly
#IRQ_AFFINITY_FILE="irq_affinity_2c_4tx_4rx.map"
61 changes: 61 additions & 0 deletions json/asl/opcua-pkt1a-tsn.json.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"ptp": {
"interface": "_PREPROCESS_STR_interface.vlan",
"gPTP_file": "gPTP_TI-1G.cfg",
"ignore_existing": true
},
"phc2sys": {
"interface": "_PREPROCESS_STR_interface",
"clock": "CLOCK_REALTIME",
"ignore_existing": true
},
"tc_group": [
{
"interface": "_PREPROCESS_STR_interface",
"taprio": {
"handle": 100,
"num_tc": 4,
"queues": "1@0 1@1 1@2 1@3",
"time_elapsed": 5,
"mapping": {
"default": 0,
"p1": 1,
"p2": 2,
"p3": 3
},
"schedule": [
{
"gate_mask": "0e",
"duration": 500000
},
{
"gate_mask": "0f",
"duration": 500000
}
],
"offload": false
},
"etf": [
{
"delta": 400000,
"queue": 3,
"offload": true
}
],
"vlanrx": [
{
"vlan_priority": 1,
"rx_hw_q": 1
},
{
"vlan_priority": 2,
"rx_hw_q": 2
},
{
"vlan_priority": 3,
"rx_hw_q": 3
}
]
}
]
}
26 changes: 26 additions & 0 deletions json/asl/opcua-pkt1a.json.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"opcua_server": {
"publisher_interface": "_PREPROCESS_STR_interface",
"subscriber_interface": "_PREPROCESS_STR_interface",
"use_xdp": false,
"packet_count": 1000000,
"cycle_time_ns": 1000000,
"polling_duration_ns": 0,
"publishers": {
"pub1": {
"url": "opc.eth://22-bb-22-bb-22-bb:3.3",
"pub_id": 2234,
"dataset_writer_id": 62541,
"writer_group_id": 101,
"early_offset_ns": 700000,
"publish_offset_ns": 900000,
"publish_delay_sec": 3,
"socket_prio": 3,
"two_way_data": false,
"cpu_affinity": 2,
"xdp_queue": -1
}
},
"subscribers": {}
}
}
42 changes: 42 additions & 0 deletions json/asl/opcua-pkt1b-tsn.json.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"ptp": {
"interface": "_PREPROCESS_STR_interface.vlan",
"gPTP_file": "gPTP_TI-1G.cfg",
"ignore_existing": true
},
"phc2sys": {
"interface": "_PREPROCESS_STR_interface",
"clock": "CLOCK_REALTIME",
"ignore_existing": true
},
"tc_group": [
{
"interface": "_PREPROCESS_STR_interface",
"mqprio": {
"handle": 100,
"num_tc": 4,
"queues": "1@0 1@1 1@2 1@3",
"mapping": {
"default": 0,
"p1": 1,
"p2": 2,
"p3": 3
}
},
"vlanrx": [
{
"vlan_priority": 1,
"rx_hw_q": 1
},
{
"vlan_priority": 2,
"rx_hw_q": 2
},
{
"vlan_priority": 3,
"rx_hw_q": 3
}
]
}
]
}
26 changes: 26 additions & 0 deletions json/asl/opcua-pkt1b.json.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"opcua_server": {
"publisher_interface": "_PREPROCESS_STR_interface",
"subscriber_interface": "_PREPROCESS_STR_interface",
"use_xdp": false,
"packet_count": 1000000,
"cycle_time_ns": 1000000,
"polling_duration_ns": 0,
"publishers": {},
"subscribers": {
"sub1": {
"url": "opc.eth://22-bb-22-bb-22-bb",
"sub_id": 0,
"subscribed_pub_id": 2234,
"subscribed_dataset_writer_id": 62541,
"subscribed_writer_group_id": 101,
"offset_ns": 1000,
"subscriber_output_file": "afpkt-rxtstamps.txt",
"temp_file_dir": "/tmp",
"two_way_data": false,
"cpu_affinity": 3,
"xdp_queue": -1
}
}
}
}
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ main() {
IFACE=$2

# Check for valid <PLAT>
if [[ "$1" == "tglu" || "$1" == "ehl" || "$1" == "tglh" || "$1" == "i225" || "$1" == "adls" || "$1" == "adln" || "$1" == "rplp" || "$1" == "rpls" ]]; then
if [[ "$1" == "tglu" || "$1" == "ehl" || "$1" == "tglh" || "$1" == "i225" || "$1" == "adls" || "$1" == "adln" || "$1" == "rplp" || "$1" == "rpls" || "$1" == "asl" ]]; then
IFACE2=""
CONFIG=$3
ACTION=$4
Expand Down
41 changes: 41 additions & 0 deletions shell/asl/tsq1a.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

###############################################################################
# Phase: Init

IFACE_MAC_ADDR="aa:00:aa:00:aa:00"

IFACE_IP_ADDR="169.254.1.11"
IFACE_BRC_ADDR="169.254.1.255"

IFACE_VLAN_IP_ADDR="169.254.11.11"
IFACE_VLAN_BRC_ADDR="169.254.11.255"
IFACE_VLAN_ID="3"

TX_Q_COUNT=4
RX_Q_COUNT=4

VLAN_PRIORITY_SUPPORT="YES"
VLAN_STRIP_SUPPORT="YES"
EEE_TURNOFF="NO"

# ADLN SKU6 - has 4 cores - comment out accordingly
IRQ_AFFINITY_FILE="irq_affinity_4c_4tx_4rx.map"
# ADLN SKU5 - has only 2 cores - comment out accordingly
#IRQ_AFFINITY_FILE="irq_affinity_2c_4tx_4rx.map"

###############################################################################
# Phase: Setup

PTP_IFACE_APPEND=".vlan"
# ADL-N has onboard TI-PHY.
PTP_PHY_HW="TI-1G"
#PTP_PHY_HW="SGMII-MV2110-1G"
PTP_TX_Q=0
PTP_RX_Q=0

###############################################################################
# Runtime

TARGET_IP_ADDR="169.254.1.11"
TEST_PERIOD=60
41 changes: 41 additions & 0 deletions shell/asl/tsq1b.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

###############################################################################
# Phase: Init

IFACE_MAC_ADDR="22:bb:22:bb:22:bb"

IFACE_IP_ADDR="169.254.1.22"
IFACE_BRC_ADDR="169.254.1.255"

IFACE_VLAN_IP_ADDR="169.254.11.22"
IFACE_VLAN_BRC_ADDR="169.254.11.255"
IFACE_VLAN_ID="3"

TX_Q_COUNT=4
RX_Q_COUNT=4

VLAN_PRIORITY_SUPPORT="YES"
VLAN_STRIP_SUPPORT="YES"
EEE_TURNOFF="NO"

# ADLN SKU6 - has 4 cores - comment out accordingly
IRQ_AFFINITY_FILE="irq_affinity_4c_4tx_4rx.map"
# ADLN SKU5 - has only 2 cores - comment out accordingly
#IRQ_AFFINITY_FILE="irq_affinity_2c_4tx_4rx.map"

###############################################################################
# Phase: Setup

PTP_IFACE_APPEND=".vlan"
# ADL-N has onboard TI-PHY.
PTP_PHY_HW="TI-1G"
#PTP_PHY_HW="SGMII-MV2110-1G"
PTP_TX_Q=0
PTP_RX_Q=0

###############################################################################
# Runtime

TARGET_IP_ADDR="169.254.1.11"
TEST_PERIOD=60
87 changes: 87 additions & 0 deletions shell/asl/vs1a.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/bin/bash

###############################################################################
# Phase: Init

IFACE_MAC_ADDR="aa:00:aa:00:aa:00"

IFACE_IP_ADDR="169.254.1.11"
IFACE_BRC_ADDR="169.254.1.255"

IFACE_VLAN_IP_ADDR="169.254.11.11"
IFACE_VLAN_BRC_ADDR="169.254.11.255"
IFACE_VLAN_ID="3"

TX_Q_COUNT=4
RX_Q_COUNT=4

VLAN_PRIORITY_SUPPORT="YES"
VLAN_STRIP_SUPPORT="YES"
EEE_TURNOFF="NO"

# ADLN SKU6 - has 4 cores - comment out accordingly
IRQ_AFFINITY_FILE="irq_affinity_4c_4tx_4rx.map"
# ADLN SKU5 - has only 2 cores - comment out accordingly
#IRQ_AFFINITY_FILE="irq_affinity_2c_4tx_4rx.map"
TEMP_DIR="/dev/shm"

###############################################################################
# Phase: Setup

TAPRIO_MAP="0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0"
TAPRIO_SCHED=("sched-entry S 0F 500000"
"sched-entry S 0E 500000"
)

# NOTE : Value 0x2 : FPE ON. Turning off fpe-qmask as per now, q0 is preemptible by default in stmmac
#TAPRIO_FLAGS="flags 0x2 fpe-qmask 0x01"
TAPRIO_FLAGS="flags 0x2"

VLAN_RX_MAP=("vlan_prio 3 hw_tc 1"
"vlan_prio 2 hw_tc 2"
)

VLAN_RX_MAP_XDP=("vlan_prio 1 hw_tc 1"
"vlan_prio 2 hw_tc 2"
)

PTP_IFACE_APPEND=".vlan"
# ADL-N has onboard TI-PHY (POR).
PTP_PHY_HW="TI-1G"
#PTP_PHY_HW="SGMII-MV2110-1G"

PTP_TX_Q=2
PTP_RX_Q=2

ETF_Q=3
ETF_DELTA=700000
#ETF_FLAGS="deadline_mode off skip_sock_check off"

IPERF_BITRATE=10M
CPU_AFFINITY=0

###############################################################################
# Runtime

TARGET_IP_ADDR="169.254.1.22"

AFP_PACKET_TEST="y"
RUN_IPERF3_AFP="y"
RUN_IPERF3_XDP="y"

TX_PKT_Q=3
RX_PKT_Q=3

TX_XDP_Q=3
RX_XDP_Q=3

TXTIME_OFFSET=20000
NUMPKTS=1000000
SIZE=64

INTERVAL=1000000
EARLY_OFFSET=700000

XDP_MODE="zT" #Zero-copy with LaunchTime
XDP_INTERVAL=200000
XDP_EARLY_OFFSET=100000
Loading

0 comments on commit a63d850

Please sign in to comment.