Skip to content

Commit

Permalink
Update 2018-12-1-eBPF-Packet-Histograms.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbojangles3 authored Nov 13, 2023
1 parent 5816a3e commit e3f14b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _posts/2018-12-1-eBPF-Packet-Histograms.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ I adapted my code from the `xdp1` example given in the kernel source located in
The code examples below utilize the API for XDP programs. From the FAQ above, we know that not all kernel code is available to XDP programs. The example kernel code does some simple math for the packet size and will atomically increment the appropriate counter. The counters are values in the eBPF maps. The user space program will read those counters from the map via file descriptors. Links to documentation are provided as comments to the code. The userspace code include code from `bpf_load.h` which assists in in communicating with the eBPF map.
### XDP Kernel Code

``` C
```
/* Copyright (c) 2016 PLUMgrid
*
* This program is free software; you can redistribute it and/or
Expand Down Expand Up @@ -82,7 +82,7 @@ char _license[] SEC("license") = "GPL";

### XDP User Code

```C
```
/* Copyright (c) 2016 PLUMgrid
*
* This program is free software; you can redistribute it and/or
Expand Down

0 comments on commit e3f14b8

Please sign in to comment.