Skip to content

Commit e44e2a5

Browse files
committed
Revert "Old dpdk with ubuntu"
This reverts commit 68382d7.
1 parent 94b28c1 commit e44e2a5

File tree

6 files changed

+25
-252
lines changed

6 files changed

+25
-252
lines changed

sdk/apps/virtual-ethernet/patches/pktgen-dpdk/master/dpdk-0006-Fixing-Kernel-Errors.patch

Lines changed: 0 additions & 120 deletions
This file was deleted.

sdk/apps/virtual-ethernet/patches/spp-dpdk/master/0006-Fixing-fallthroughs.patch

Lines changed: 0 additions & 106 deletions
This file was deleted.

sdk/apps/virtual-ethernet/scripts/virtual_ethernet_install.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env python
22

33
# Amazon FPGA Hardware Development Kit
44
#
@@ -18,7 +18,7 @@
1818
from __future__ import print_function
1919
import os
2020
import sys
21-
import distro
21+
import platform
2222
import glob
2323
import argparse
2424
import logging
@@ -54,9 +54,8 @@ def cmd_exec(cmd):
5454
sys.exit(1)
5555

5656
def install_dpdk_dep():
57-
installed_distro = distro.name()
58-
print("installed_distro = {installed_distro}")
59-
if (installed_distro == "Ubuntu"):
57+
distro = platform.linux_distribution()
58+
if (distro[0] == "Ubuntu"):
6059
cmd_exec("apt -y install libnuma-dev")
6160
cmd_exec("apt -y install libpcap-dev")
6261
else:
@@ -91,7 +90,7 @@ def install_dpdk(install_path):
9190
patchfiles = []
9291
for patchfile in sorted(glob.iglob("%s/000*.patch" % (patches_path))):
9392
logger.debug("found patchfile=%s" % patchfile)
94-
patchfiles.append(os.path.abspath(patchfile))
93+
patchfiles.append(os.path.abspath(patchfile))
9594

9695
# cd to the install_path directory
9796
os.chdir("%s" % (install_path))

sdk/apps/virtual-ethernet/scripts/virtual_ethernet_pktgen_install.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env python
22

33
# Amazon FPGA Hardware Development Kit
44
#
@@ -18,7 +18,7 @@
1818
from __future__ import print_function
1919
import os
2020
import sys
21-
import distro
21+
import platform
2222
import glob
2323
import argparse
2424
import logging
@@ -65,8 +65,8 @@ def cmd_exec(cmd):
6565
sys.exit(1)
6666

6767
def install_dpdk_dep():
68-
installed_distro = distro.name()
69-
if (installed_distro == "Ubuntu"):
68+
distro = platform.linux_distribution()
69+
if (distro[0] == "Ubuntu"):
7070
cmd_exec("sudo apt -y install libnuma-dev")
7171
cmd_exec("sudo apt -y install libpcap-dev")
7272
else:
@@ -100,12 +100,12 @@ def install_pktgen_dpdk(install_path):
100100
patchfiles = []
101101
for patchfile in sorted(glob.iglob("%s/000*.patch" % (patches_path))):
102102
logger.debug("found patchfile=%s for pktgen" % patchfile)
103-
patchfiles.append(os.path.abspath(patchfile))
103+
patchfiles.append(os.path.abspath(patchfile))
104104
# Read in the dpdk patch filenames
105105
dpdk_patchfiles = []
106106
for dpdk_patchfile in sorted(glob.iglob("%s/dpdk*.patch" % (patches_path))):
107107
logger.debug("found patchfile=%s for dpdk" % dpdk_patchfile)
108-
dpdk_patchfiles.append(os.path.abspath(dpdk_patchfile))
108+
dpdk_patchfiles.append(os.path.abspath(dpdk_patchfile))
109109
# cd to the install_path directory
110110
os.chdir("%s" % (install_path))
111111

sdk/apps/virtual-ethernet/scripts/virtual_ethernet_pktgen_setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env python
22

33
# Amazon FPGA Hardware Development Kit
44
#
@@ -18,7 +18,7 @@
1818
from __future__ import print_function
1919
import os
2020
import sys
21-
import distro
21+
import platform
2222
import glob
2323
import argparse
2424
import subprocess
@@ -58,8 +58,8 @@ def cmd_exec(cmd, check_return=True):
5858
sys.exit(1)
5959

6060
def load_uio():
61-
installed_distro = distro.name()
62-
if (installed_distro == "Ubuntu"):
61+
distro = platform.linux_distribution()
62+
if (distro[0] == "Ubuntu"):
6363
cmd_exec("modprobe uio")
6464
else:
6565
cmd_exec("modprobe uio_pci_generic")
@@ -112,7 +112,7 @@ def setup_dpdk(install_path, eni_dbdf, eni_ethdev):
112112

113113
# Bind the ENI device to to DPDK
114114
cmd_exec("ifdown %s" % (eni_ethdev))
115-
cmd_exec("python3 %s --bind=igb_uio %s" % (dpdk_devbind, eni_dbdf))
115+
cmd_exec("%s --bind=igb_uio %s" % (dpdk_devbind, eni_dbdf))
116116

117117
# cd back to the original directory
118118
os.chdir("%s" % (cwd))

0 commit comments

Comments
 (0)