Skip to content

Instantly share code, notes, and snippets.

View YutaroHayakawa's full-sized avatar
🌴
On vacation

Yutaro Hayakawa YutaroHayakawa

🌴
On vacation
  • Isovalent at Cisco
  • San Jose, California, US
  • 03:46 (UTC -07:00)
  • X @YutaroHayakawa
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <signal.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
#include <getopt.h>
@YutaroHayakawa
YutaroHayakawa / example.c
Last active August 3, 2020 05:37
Brief usage of the libgbpf (not tested, sorry...)
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <gbpf/gbpf.h>
struct my_data {
int mymap;
int myprog;
};
50751335472371 003 ip_rcv_finish
50751335488968 003 ip_route_input_noref
50751335500096 003 ip_local_deliver
50751335508048 003 ip_local_deliver_finish
50751335511220 003 ip_protocol_deliver_rcu
50751335515955 003 raw_local_deliver
50751335520090 003 xfrm4_esp_rcv
50751335527135 003 xfrm4_rcv
50751335531910 003 xfrm_input
50751335540593 003 secpath_set
50091332972064 000 ip_rcv_finish
50091332990895 000 ip_route_input_noref
50091333002316 000 ip_local_deliver
50091333010230 000 ip_local_deliver_finish
50091333013020 000 ip_protocol_deliver_rcu
50091333017298 000 raw_local_deliver
50091333020764 000 xfrm4_esp_rcv
50091333025875 000 xfrm4_rcv
50091333029768 000 xfrm_input
50091333038316 000 secpath_set
2012388348025305 001 dev_queue_xmit
2012388348026064 001 __dev_queue_xmit
2012388348026864 001 netdev_core_pick_tx
2012388348028138 001 validate_xmit_skb
2012388348029671 001 netif_skb_features
2012388348031002 001 skb_network_protocol
2012388348032010 001 validate_xmit_xfrm
2012388348033276 001 dev_hard_start_xmit
2012388348034273 001 ieee80211_subif_start_xmit
2012388348035331 001 __ieee80211_subif_start_xmit
@YutaroHayakawa
YutaroHayakawa / Makefile
Last active May 1, 2022 19:21
Demo environment for Cilium BGP Control Plane feature
deploy:
kind create cluster --config cluster.yaml
sudo containerlab -t topo.yaml deploy
helm install --kube-context kind-clab-kind-in-clab -n kube-system cilium cilium/cilium --version v1.12.0-rc1 -f values.yaml
kubectl apply -f netshoot-ds.yaml
reload:
kind delete clusters clab-kind-in-clab
sudo containerlab -t topo.yaml destroy
kind create cluster --config cluster.yaml