Skip to content

Instantly share code, notes, and snippets.

$ git diff pkg/types/conf.go
diff --git a/pkg/types/conf.go b/pkg/types/conf.go
index b0ca491..2420c67 100644
--- a/pkg/types/conf.go
+++ b/pkg/types/conf.go
@@ -143,10 +143,13 @@ func LoadDelegateNetConf(bytes []byte, net *NetworkSelectionElement, deviceID st
}
// mergeCNIRuntimeConfig creates CNI runtimeconfig from delegate
-func mergeCNIRuntimeConfig(runtimeConfig *RuntimeConfig, delegate *DelegateNetConf) *RuntimeConfig {
apiVersion: v1
kind: Pod
metadata:
name: sriov-pod-1
annotations:
k8s.v1.cni.cncf.io/networks: sriov-net-a, sriov-net-b
spec:
containers:
- name: sriov-example
image: dpdk-app-centos:latest
@Billy99
Billy99 / SPEC.md
Last active October 13, 2020 21:17

Device Information Specification

Network Plumbing Working Group

Version 0.1

This document describes the de-facto standard for sharing device information between Device Plugins, NPWG Implementations and CNI plugins in Kubernetes.

Kubernetes Network Plumbing Working Group

The Kubernetes Network Plumbing Working Group is an informal group working to enable flexible networking for Kubernetes.

Device Information Specification

This repository contains the officially approved versions of the Kubernetes Network Plumbing Working Group's Device Information Specification.

$ docker exec -ti ovn-worker /bin/sh
#
#
# iptables -t nat -L -n
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
OVN-KUBE-EXTERNALIP all -- 0.0.0.0/0 0.0.0.0/0
OVN-KUBE-NODEPORT all -- 0.0.0.0/0 0.0.0.0/0
KUBE-SERVICES all -- 0.0.0.0/0 0.0.0.0/0 /* kubernetes service portals */
kubectl exec -c sb-ovsdb -n ovn-kubernetes $(< ~/scripts/ovnGetOvnDb.txt) -it -- ovn-trace ovn-worker2 'inport == "services-7355_execpod9m6dk" && eth.src == 0a:58:25:07:51:d2 && ip6.src == fd00:10:244:3::f && tcp.src == 6443 && eth.dst ==0a:58:71:75:e6:87 && ip6.dst == 2001:db8:1::242:ac11:3 && tcp.dst == 31461 && ip.ttl == 64'
# tcp6,reg14=0x6,vlan_tci=0x0000,dl_src=0a:58:25:07:51:d2,dl_dst=0a:58:71:75:e6:87,ipv6_src=fd00:10:244:3::f,ipv6_dst=2001:db8:1::242:ac11:3,ipv6_label=0x00000,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=6443,tp_dst=31461,tcp_flags=0
ingress(dp="ovn-worker2", inport="services-7355_execpod9m6dk")
--------------------------------------------------------------
0. ls_in_port_sec_l2 (ovn-northd.c:4754): inport == "services-7355_execpod9m6dk" && eth.src == {0a:58:25:07:51:d2}, priority 50, uuid 1f7247e6
next;
1. ls_in_port_sec_ip (ovn-northd.c:4438): inport == "services-7355_execpod9m6dk" && eth.src == 0a:58:25:07:51:d2 && ip6.src == {fe80::858:25ff:fe07:51d2, fd00:10:244:3::f}, priority 90,
-------------- **END HERE - TRACE-1 **
| eth0 |
--------------
| 02:42:ac:11:00:02
|
|
|
|
--------------
-------------- **END HERE - TRACE-1 **
| eth0 |
--------------
| 02:42:ac:11:00:03
|
|
|
|
--------------
$ kubectl exec -c sb-ovsdb -n ovn-kubernetes $(< ~/scripts/ovnGetOvnDb.txt) -it --
ovn-trace ovn-worker2 'inport == "default_test" &&
eth.src == 0a:58:71:90:19:61 &&
ip6.src == fd00:10:244:2::4 &&
tcp.src == 6443 &&
eth.dst == 0a:58:77:98:75:3e &&
ip6.dst == 2001:db8:1::242:ac11:2 &&
tcp.dst == 6443 &&