VPP-124: Fix rpms to work out of the box. 53/1453/1
authorEd Warnicke <eaw@cisco.com>
Wed, 8 Jun 2016 19:41:40 +0000 (14:41 -0500)
committerEd Warnicke <eaw@cisco.com>
Wed, 8 Jun 2016 19:41:40 +0000 (14:41 -0500)
Currently, for vpp we are not building any rpms for dpdk or igb_uio.
This is because uio_pci_generic as shipped with centos works with vpp.
However, our vpp rpms do not install kernel module uio_pci_generic at
start up and the /etc/vpp/startup.conf does not configure vpp to use
uio_pci_generic.

vpp rpms should do both, so that when the vpp rpm is installed and
vpp started, it just works out of the box.

This patch fixes the rpms to do so.

Change-Id: Ib934b51f9271cded466d235aa4044bef75c35960
Signed-off-by: Ed Warnicke <eaw@cisco.com>
build-root/rpm/vpp.service
build-root/rpm/vpp.spec
vpp/conf/startup.uiopcigeneric.conf [new file with mode: 0644]

index fc66b15..40bf9d4 100644 (file)
@@ -3,6 +3,8 @@ Description=Vector Packet Processing Process
 After=syslog.target network.target auditd.service
 
 [Service]
+ExecStartPre=-/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api
+ExecStartPre=-/sbin/modprobe uio_pci_generic
 ExecStart=/usr/bin/vpp -c /etc/vpp/startup.conf
 Type=simple
 Restart=on-failure
index 85b1286..2513041 100644 (file)
@@ -63,7 +63,7 @@ install -p -m 755 %{_vpp_build_dir}/vppapigen/vppapigen %{buildroot}%{_bindir}
 mkdir -p -m755 %{buildroot}/etc/vpp
 mkdir -p -m755 %{buildroot}/etc/sysctl.d
 install -p -m 644 vpp.service %{buildroot}%{_unitdir}
-install -p -m 644 ../../vpp/conf/startup.conf %{buildroot}/etc/vpp
+install -p -m 644 ../../vpp/conf/startup.uiopcigeneric.conf %{buildroot}/etc/vpp/startup.conf
 install -p -m 644 ../../vpp/conf/80-vpp.conf %{buildroot}/etc/sysctl.d
 #
 # libraries
diff --git a/vpp/conf/startup.uiopcigeneric.conf b/vpp/conf/startup.uiopcigeneric.conf
new file mode 100644 (file)
index 0000000..69bdb71
--- /dev/null
@@ -0,0 +1,14 @@
+
+unix {
+  nodaemon
+  log /tmp/vpp.log
+  full-coredump
+}
+
+dpdk {
+    uio-driver uio_pci_generic
+}
+
+api-trace {
+  on
+}