Visible to Intel only — GUID: bes1674253743797
Ixiasoft
Visible to Intel only — GUID: bes1674253743797
Ixiasoft
7.9. Building, Installing, and Running the Software
- Log in as Super User.
Run the command below:
-- sudo -s
- Install the dependent packages.
To Install the dependencies for drivers built on the platform Ubuntu 22.04-48-generic, run the commands below:
Note:Make sure the kernel version is 5.15.0-48-generic. Also make sure that your yum the repository proxy, the environment proxies are set properly, and you have the sudo access.-- sudo apt install -y build-essential libpython3-dev libdbus-1-dev -- sudo apt-get -y install dbus libdbus-1-dev libdbus-glib-1-2 libdbus-glib-1-dev -- sudo apt-get install -y libnl-route-3-dev -- sudo apt install libelf-dev -- apt install openssh-server -y -- sudo apt-get install libnl-genl-3-dev
- Build all applications and drivers.
Run the command below:
-- ./build.sh all- Get the MCDMA module.
Run the command below:
-- git submodule update –init
- Build all applications and drivers.
Note: All drivers/applications are copied to the binaries folder. To build only the required drivers/applications, refer to the app folders for patches and build scripts.
Run the command below:
-- ./build.sh all
In addition to the above, you can do the following to build binaries separately and they are copied to the binaries folder:
-- ./build.sh iptool
-- ./build.sh wpa_supplicant
-- ./build.sh linux_macsec
-- ./build.sh ipdriver
-- ./build.sh mcdma
- Build individual applications and drivers.
- To build the MCDSM driver, run the commands below, which build the MCDM and the MACsec IP source code:
-- cd mcdma/driver/kmod/mcdma-netdev-driver/
-- make clean all
- To build the Linux MACsec driver, run the commands below:
-- cd linux_macsec/
-- ./linux_macsec_build.sh
- To build IProute2 – iptool application, run the commands below:
-- cd iptool/
-- ./iptool_build.sh
- To build the wpa_supplicant application, run the commands below:
-- cd wpa_supplicant/
-- ./build_wpa.sh
- To build the CLI tool, run the commands below:
-- cd cli/
-- make clean all
- To build the MACsec IP driver code used for the HPS based design, run the command below from the base folder to create the MACsec IP driver:
-- make clean all
- To build the MCDSM driver, run the commands below, which build the MCDM and the MACsec IP source code:
- Install the drivers.
- MCDMA + MACsec IP driver.
Run the command below:
-- cd binaries
Copy the pf_test.sh file to the binaries from the wpa_supplicant directory. Run the pf_test.sh file to insert and create 2 name-spaces as "ns0" and "ns1". Two MACsec IPs are present in the example design of the HW. So 2 name-spaces are created.
Run the commands below to login to name-spaces:
-- ip netns exec ns0 bash
-- ip netns exec ns1 bash
- Linux MACsec driver.
After compiling/building, run the command below to insert the module:
-- insmod macsec.ko
- Run the CLI tool.
Run the command below to list the supported parameters:
-- ./cli_macsec -h
- Run the IP tool app.
The IP tool is an ip-macsec reference application.
Make sure the [Linux MACsec driver](#42-linux-macsec-driver) is inserted before proceeding.- To configure the MACsec IP from iptool:
a. Run the command below to log in to "ns0":
-- ip netns exec ns0 bash
Below are some example `ip` commands to configure `ifc_mcdma0` for the `macsec0` interface:
-- ./ip link add link ifc_mcdma0 macsec0 type macsec address 6e:ed:32:da:fe:4b port 0 encrypt off offload mac -- ./ip macsec add macsec0 tx sa 0 sc 0 on pn 1 key 01 ABCD1234567891011121314151617181 -- ./ip macsec add macsec0 rx port 0 address 96:2d:5a:25:ac:ae on -- ./ip macsec add macsec0 rx address 96:2d:5a:25:ac:ae port 0 sa 0 sc 0 pn 1 on key 01 ABCD1234567891011121314151617181
b. Run the command below to log in to "ns1":
-- ip netns exec ns1 bash
Below are some example `ip` commands to configure `ifc_mcdma1` for the `macsec1` interface:
-- ./ip link add link ifc_mcdma1 macsec0 type macsec address 96:2d:5a:25:ac:ae port 0 encrypt off offload mac -- ./ip macsec add macsec0 tx sa 0 sc 0 on pn 1 key 01 ABCD1234567891011121314151617181 -- ./ip macsec add macsec0 rx port 0 address 6e:ed:32:da:fe:4b on -- ./ip macsec add macsec0 rx address 6e:ed:32:da:fe:4b port 0 sa 0 sc 0 pn 1 on key 01 ABCD1234567891011121314151617181
- Follow these steps to initiate traffic via the CLI tool after configuring using the ip tool:
a. Run the command below to check the HSSI status (Read data should be 0x1E):
--./cli_macsec ppbb_reg_read -d ifc_mcdma0 -i 0 -o 0x0054 -r
b. Run the command below to configure the number of packets to be transmitted:
--./cli_macsec ppbb_reg_write -d ifc_mcdma0 -i 0 -o 0x001c -w 0x00000400
c. Run the command below to configure the packet size (min size in [13:0], max size in [29:16]):
--./cli_macsec ppbb_reg_write -d ifc_mcdma0 -i 0 -o 0x0020 -w 0x00500050
d. Run the command below to start traffic in the dynamic mode:
--./cli_macsec ppbb_reg_write -d ifc_mcdma0 -i 0 -o 0x0000 -w 0x00008611
e. Run the command below to read the checker packet counter (wait for this counter to display equal packet number before proceeding to the next step):
--./cli_macsec ppbb_reg_read -d ifc_mcdma0 -i 0 -o 0x005c -r
- To show the MACsec IP statistics, run the command below to login to the specific console, i.e. ns0 or ns1, to read out the statistics:
--./ip -s macsec show
- To configure the MACsec IP from iptool:
- Run the wpa_supplicant.
The WPA is a MACsec MKA reference application.
Follow these steps below:- Insert the [McDMA+MACsec IP drivers](#41-mcdma--macsec-ip-driver).
- Insert the [Linux MACsec driver](#42-linux-macsec-driver).
- Run the wpa_supplicant.
Below is an example:
--./wpa_supplicant -i ifc_mcdma0 -Dmacsec_linux -c mka_default.conf
Below are example steps to evaluate the wpa_supplicant, which needs three terminals in parallel.- In the terminal window 1, do the following:
a. Navigate to binaries folder.
b. Log in to the ns0: ip netns exec ns0 bash.
c. Execute this command: sh wpa_offload.sh.
- In the terminal window 2, do the following:
a. Navigate to binaries folder.
b. Log in to the ns1: ip netns exec ns1 bash.
c. Execute this command: sh wpa_offload.sh1-+.
- In the terminal window 3, do the following:
a. Navigate to binaries folder.
b. Log in to the ns0: ip netns exec ns0 bash.
c. Run the steps as in step IV-2 (initiate traffic via the CLI tool after configuring using the ip tool) above.
For statistics, repeat step IV-3 (show the MACsec IP statistics) above.
- In the terminal window 1, do the following:
- MCDMA + MACsec IP driver.
- Get the MCDMA module.