From df63161bafa18c05318e7a87fd6422b1095e1a5a Mon Sep 17 00:00:00 2001 From: Alberto Compagno Date: Tue, 1 Oct 2019 18:09:01 +0200 Subject: [HICN-287] Adding hicn section to the startup.conf Checking if the size of the CS is greater than the number of vlib buffers available and size it accordingly. Removed unused parameters to set PIT lifetime Change-Id: I47679466542d4338e447d9e0b956038143164020 Signed-off-by: Alberto Compagno --- hicn-plugin/scripts/post | 19 +++++++++++++++++++ hicn-plugin/scripts/postinst | 18 ++++++++++++++++++ hicn-plugin/scripts/postun | 5 +++++ 3 files changed, 42 insertions(+) create mode 100644 hicn-plugin/scripts/post create mode 100644 hicn-plugin/scripts/postinst create mode 100644 hicn-plugin/scripts/postun (limited to 'hicn-plugin/scripts') diff --git a/hicn-plugin/scripts/post b/hicn-plugin/scripts/post new file mode 100644 index 000000000..3cde599ca --- /dev/null +++ b/hicn-plugin/scripts/post @@ -0,0 +1,19 @@ +#!/bin/bash + +if [ -e /etc/vpp/startup.conf ]; then + if ! grep -q "hicn" /etc/vpp/startup.conf; then + printf '\n hicn { + ## Set PIT size. Default is 131 072 entries + # pit-size 500000 + # + ## Set CS size. Default is 4096 + # cs-size 50000 + # + ## Set maximum PIT entries lifetime in milliseconds. Assigned to a PIT entry in case an interest carries a bigger lifetime + # pit-lifetime-max 20 + # + ## Percentage of CS to reserve for application producer faces + # cs-reserved-app 20\n}' >> /etc/vpp/startup.conf + fi; +fi; +ln -s /usr/lib64/vpp_plugins/hicn_plugin.so /usr/lib/vpp_plugins/hicn_plugin.so \ No newline at end of file diff --git a/hicn-plugin/scripts/postinst b/hicn-plugin/scripts/postinst new file mode 100644 index 000000000..012fc3571 --- /dev/null +++ b/hicn-plugin/scripts/postinst @@ -0,0 +1,18 @@ +#!/bin/bash + +if [ -e /etc/vpp/startup.conf ]; then + if ! grep -q "hicn" /etc/vpp/startup.conf; then + printf '\n hicn { + ## Set PIT size. Default is 131 072 entries + # pit-size 500000 + # + ## Set CS size. Default is 4096 + # cs-size 50000 + # + ## Set maximum PIT entries lifetime in milliseconds. Assigned to a PIT entry in case an interest carries a bigger lifetime + # pit-lifetime-max 20 + # + ## Percentage of CS to reserve for application producer faces + # cs-reserved-app 20\n}' >> /etc/vpp/startup.conf + fi; +fi; \ No newline at end of file diff --git a/hicn-plugin/scripts/postun b/hicn-plugin/scripts/postun new file mode 100644 index 000000000..c319f014e --- /dev/null +++ b/hicn-plugin/scripts/postun @@ -0,0 +1,5 @@ +#!/bin/bash + +if [ -L /usr/lib/vpp_plugins/hicn_plugin.so ]; then + rm /usr/lib/vpp_plugins/hicn_plugin.so +fi; \ No newline at end of file -- cgit 1.2.3-korg