# tsn-utils **Repository Path**: mirrors_Xilinx/tsn-utils ## Basic Information - **Project Name**: tsn-utils - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-05-10 - **Last Updated**: 2026-04-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## TSN Utility Applications tsn-utils repo contains all tsn user space applications, out of box scripts and various config files related to TSN. * tsn-apps: Contains all the tsn related utilities switch_prog and other setup scritps and their corresponding configuration data, if any. * switch_prog: Used for programming port states, VLAN membership and Learning/Aging/Flush. * qbv_sched: Used for programming the scheduler gate time for each queue https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/25034864/Xilinx+TSN+Solution#XilinxTSNSolution-RunningQbv%2FTimeAwareShaper%3A * tadma_prog: Used for programming ST streams DMA fetch time https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/25034864/Xilinx+TSN+Solution#XilinxTSNSolution-TimeAwareDMA(TADMA) * qci_prog: Used for programming the filtering & policing parameters. * cb_prog: Used for programming the redundancy feature parameters To be used in conjunction with switch_cam entries. * switch_cam: Used for programming the switch CAM entries * switch_cam2: Used for programming the switch CAM entries supersedes switch_cam (Please refer to TSN SW UG for more details) * br_prog: Used for programming the preemption parameters * tsn-conf: Contains linuxptp configuration files for various profiles for PTP server and client * tsn-scripts: Provides default Out of Box scripts for demostrating TSN functionality > For more information, please refer to TSN Software User Guide or wiki page: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/25034864/Xilinx+TSN+Solution ## Build Instructions - Install build pre-requisites ```bash sudo apt install -y build-essential bzip2 cmake libtool libconfig-dev libnl-3-dev libreadline-dev flex libnl-genl-3-dev libmnl-dev ``` - Clone repo ```bash git clone https://github.com/Xilinx/tsn-utils.git cd tsn-utils ``` - Build and Install ```bash sudo make install ``` ## Run Instructions 1. Run interface setup on Board1 : `source /usr/bin/net_setup.sh -b1` 2. Run interface setup on Board2 : `source /usr/bin/net_setup.sh -b2` 3. Run PTP on Board1 in master mode : `source /usr/bin/start_ptp.sh -m` 4. Run PTP on Board2 in slave mode : `source /usr/bin/start_ptp.sh -s` 5. switch_prog : Example for forwarding ``` switch_prog -s 4 ``` 6. qci_prog : Example usage on receiver side, to filter based on size ``` qci_prog -s 1 0 1 1 ``` 7. cb_prog : Example to demonstrate redundant streams with vlan id 10 and 20 ``` (Receiver) switch_cam -a 10 swp0 7 switch_cam -a swp0 8 cb_prog -a swp1 0 32 noport 0 0 7 7 0 0 1 1 cb_prog -a swp2 0 32 noport 0 0 8 7 0 0 1 1 (Sender) switch_cam -a 10 swp1,swp2 35 cb_prog -a noport 65535 0 swp2 20 0 35 24 0 0 1 1 ``` 8. switch_cam : Example ``` To add switch_cam -a To delete switch_cam -d ``` 9. br_prog : Example ``` br_prog enable br_prog stats ``` ## License ``` Copyright (c) 2016-2022 Xilinx, Inc. All rights reserved. Copyright (C) 2022 - 2023 Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: MIT ```