#!/bin/bash
#

# tear down bridge

# /usr/sbin/brctl show


/usr/sbin/ifconfig br0 down
/usr/sbin/brctl delif br0 enp7s0
/usr/sbin/brctl delif br0 enp8s0
/usr/sbin/brctl delbr br0


# set up hugepages

/usr/bin/dpdk-hugepages.py -s # shows hugepages setup

/usr/bin/dpdk-hugepages.py --setup 1G

/usr/bin/dpdk-hugepages.py -s # shows hugepages setup

# Set up NICs

/usr/bin/dpdk-devbind.py --status-dev net  # shows nic status

/usr/bin/dpdk-devbind.py -b uio_pci_generic 0000:07:00.0
/usr/bin/dpdk-devbind.py -b uio_pci_generic 0000:08:00.0

/usr/bin/dpdk-devbind.py --status-dev net  # shows nic status

#/usr/local/bin/suricata703dev -vvvv -c /etc/suricata/suricata.dpdk.tap.yaml --dpdk
#/opt/suricata/suricata-src/suricata-7-dev/src/suricata -vvvv -c /etc/suricata/suricata.dpdk.tap.yaml --dpdk
/opt/suricata/suricata-src/suricata-8-dev/src/suricata -vvvv -c /etc/suricata/suricata.dpdk.tap.yaml --dpdk
