#!/bin/bash -x

set -o errexit
set -o pipefail
set -o nounset

exec 3>&1
exec &>>/var/log/$(basename $0).log

PATH="$CNI_PATH:$(dirname "${BASH_SOURCE[0]}"):$PATH"
CNI_CONF=$(cat /dev/stdin)

get_peer_name() {
	echo "$1-vdev"
}

get_mac_with_vfpci() {
	local vfdir=$(find /sys/devices/pci* -name $1 | grep -v iommu)
	local pf=$(readlink $vfdir/physfn | awk '{print substr($1,4)}')
	local pfdir=$(find /sys/devices/pci* -name $pf | grep -v iommu)
	local pfName=$(ls $pfdir/net/ | head -1)
	local idx=$(ls -l $pfdir | awk -v vf=$1 'substr($11,4)==vf {print substr($9,7)}')
	local mac=$(ip link show dev $pfName | awk -v idx="$idx" '$1=="vf" && $2==idx {print substr($4,1,17)}')
	echo $mac
}

add_vlan() {
	vfpci=$(echo $CNI_CONF | jq -r '.deviceID')
	local vfdir=$(find /sys/devices/pci* -name $vfpci | grep -v iommu)
	local pf=$(readlink $vfdir/physfn | awk '{print substr($1,4)}')
	local pfdir=$(find /sys/devices/pci* -name $pf | grep -v iommu)
	local pfName=$(ls $pfdir/net/ | head -1)
	local idx=$(ls -l $pfdir | awk -v vf=$vfpci 'substr($11,4)==vf {print substr($9,7)}')

	vlan=$(echo $CNI_CONF | jq -r '.vlan // empty')
	if [ ! -z "$vlan" ]; then
	        ip link set $pfName vf $idx vlan $vlan
	fi
}

ipam() {
	local plugin=$(echo $CNI_CONF | jq -r '.ipam.type')
	local res=$(echo $"$CNI_CONF" | "$plugin" | jq -c '.')
	echo $res
}

add_pair_ns() {
	vfpci=$(echo $CNI_CONF | jq -r '.deviceID')
	mac=$(echo $CNI_CONF | jq -r '.runtimeConfig.mac // empty')
	if [ -z "$mac" ]; then
		mac=$(get_mac_with_vfpci $vfpci)
	fi
	peer=$(get_peer_name $CNI_IFNAME)
	ip=$1

	mkdir -p /var/run/netns/
	ln -sfT $CNI_NETNS /var/run/netns/$CNI_CONTAINERID

	ip netns exec $CNI_CONTAINERID ip link add $CNI_IFNAME type veth peer name $peer
	ip netns exec $CNI_CONTAINERID ip link set $CNI_IFNAME addr $mac up alias $vfpci
	ip netns exec $CNI_CONTAINERID ip link set $peer up
	ip netns exec $CNI_CONTAINERID ip addr add $ip dev $CNI_IFNAME
}

delete_pair_ns() {
	ip netns exec $CNI_CONTAINERID ip link del $CNI_IFNAME
}

delete_vlan() {
	vfpci=$(echo $CNI_CONF | jq -r '.deviceID')
	local vfdir=$(find /sys/devices/pci* -name $vfpci | grep -v iommu)
	local pf=$(readlink $vfdir/physfn | awk '{print substr($1,4)}')
	local pfdir=$(find /sys/devices/pci* -name $pf | grep -v iommu)
	local pfName=$(ls $pfdir/net/ | head -1)
	local idx=$(ls -l $pfdir | awk -v vf=$vfpci 'substr($11,4)==vf {print substr($9,7)}')

	vlan=$(echo $CNI_CONF | jq -r '.vlan // empty')
	if [ ! -z "$vlan" ]; then
		ip link set $pfName vf $idx vlan 0
	fi
}

case $CNI_COMMAND in
ADD)
	res=$(ipam)
	ip=$(echo $res | jq -r '.ips[0].address')
	add_pair_ns $ip
	add_vlan
	echo '{"cniVersion":"0.3.1"}' | jq -c --arg ip $ip '.ips[0].address = $ip' >&3
	;;
DEL)
	set +o errexit
	ipam
	delete_pair_ns
	delete_vlan
	set -o errexit
	;;
*)
	echo "CNI_COMMAND=[ADD|DEL] only supported"
	exit 1
	;;
esac
