Benutzer-Werkzeuge

Webseiten-Werkzeuge


ne:sdn:p4:tofino

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
ne:sdn:p4:tofino [2022/12/07 13:09] – [Use SDK P4studio] adminne:sdn:p4:tofino [2023/08/10 18:14] (aktuell) admin
Zeile 1: Zeile 1:
 ====== Intel Tofino ====== ====== Intel Tofino ======
 +    * https://www.intel.com/content/www/us/en/products/details/network-io/intelligent-fabric-processors.html -- **Tofino & P4 Studio**
  
     * https://networkbuilders.intel.com/university/programs-offered     * https://networkbuilders.intel.com/university/programs-offered
     * https://networkbuilders.intel.com/university/membership-benefits     * https://networkbuilders.intel.com/university/membership-benefits
 +=== Ressources (SDK, etc.): ===
 +
 +    * https://github.com/barefootnetworks/Open-Tofino -- **Open-Tofino**
 +    * https://www.intel.com/content/www/us/en/resources-documentation/developer.html#panel-top-resources|most-popular
 +    * https://www.intel.com/content/www/us/en/developer/overview.html (P4 Studio, nach neuesten Filtern)
  
 ===== Use SDK P4studio ===== ===== Use SDK P4studio =====
Zeile 13: Zeile 19:
 sudo $SDE_INSTALL/bin/veth_setup.sh sudo $SDE_INSTALL/bin/veth_setup.sh
  
-# 1. compile+# 1. compile [1.Shell]
 ~/tools/p4_build.sh ~/labs/01-simple_l3/p4src/simple_l3.p4 ~/tools/p4_build.sh ~/labs/01-simple_l3/p4src/simple_l3.p4
-# 2. run tofino-model+# 2. run tofino-model [1. Shell]
 $SDE/run_tofino_model.sh -p simple_l3 $SDE/run_tofino_model.sh -p simple_l3
-# 3. run the driver (bf_switchd) (separate terminal)+# 3. run the driver (bf_switchd) [2. Shell]
 $SDE/run_switchd.sh -p simple_l3 $SDE/run_switchd.sh -p simple_l3
  
-#bfshell-Access script (should be run in a separate terminal)+4. bfshell-Access oder Python Script [3. Shell]
 $SDE/run_bfshell.sh $SDE/run_bfshell.sh
 +#oder ein Python Skript starten
 +~/bf-sde-9.9.1/run_bfshell.sh -b ~/labs/lab_1112/02-simple_l3_acl/bfrt_python/basic_setup.py -i
  
-#scapy (run in separte terminal)+#scapy (run in separte terminal - 4. Shell)
 >>> sendp(Ether()/IP(dst='5.5.5.5')/UDP()/'abcdefg', iface="veth1") >>> sendp(Ether()/IP(dst='5.5.5.5')/UDP()/'abcdefg', iface="veth1")
  
Zeile 121: Zeile 129:
 export SDE=/home/user/bf-sde-9.9.1/ export SDE=/home/user/bf-sde-9.9.1/
 cd bf-sde-9.9.1/; . ~/tools/set_sde.bash  cd bf-sde-9.9.1/; . ~/tools/set_sde.bash 
 +# oder
 +source ~/tools/set_sde.bash 
 +sudo $SDE_INSTALL/bin/bf_kdrv_mod_load $SDE_INSTALL # lädt den User-Mode-Driver (ICA 1131)
 +</code>
 +Die Variablen werden derzeit über die ''.profile''-Datei beim Einloggen gesetzt (führt zu Fehlermeldung,
 +falls Kerneldriver bereits geladen)
 +
 +==== P4 Programm starten ====
 +<code bash>
 +./run_switchd.sh -p diag # startet bf_shell, exit mit Ctrl-\: Ctrl-AltGr-ß / Ctrl-Alt-Umschalt-7
 +./run_switchd.sh -p simple # startet simple.p4
  
-sudo $SDE_INSTALL/bin/bf_kdrv_mod_load $SDE_INSTALL 
-./run_switchd.sh -p diag #startet bf_shell 
 bfshell> ucli bfshell> ucli
  
 qspf show qspf show
- 
 pm show pm show
 port-add 1/0 10G NONE port-add 1/0 10G NONE
Zeile 137: Zeile 153:
 ---- ----
  
-===== EdgeCore AS 4610 =====+===== EdgeCore AS 4610 (172.16.1.8) =====
 Default Login für baseboxd\\ Default Login für baseboxd\\
 **login:** basebox **login:** basebox
ne/sdn/p4/tofino.1670418554.txt.gz · Zuletzt geändert: 2022/12/07 13:09 von admin