[Cake] passing args to bpf programs
Stephen Hemminger
stephen at networkplumber.org
Wed Aug 1 12:35:22 EDT 2018
On Wed, 1 Aug 2018 09:22:41 -0700
Dave Taht <dave.taht at gmail.com> wrote:
> this really isn't the right list for this... but I wanted to build on
> the ack_filter bpf code I had, to create impairments, like dropping
> acks every X packets, or randomly, or when a specific pattern is seen
> (like timestamps or sack). This was sort of the reverse complement to
> getting the cake ack-filter right, now that I know everything that can
> go wrong...
>
> I see I can return ACT_SHOT, so I can drop packets.
>
> But what I can't quite figure out is how to pass args to an tc ebpf
> program. Do I have to pass those via a file descriptor? A map
> generated elsewhere? what? Sure as heck don't want to compile one
> program per opt....
>
> Simplest args would be:
>
> max 16 - drop every 16th ack packet
> random 24 - drop randomly between 0 24
> match only certain flags
>
> followed by more gnarly ones like:
>
> miscalculate if I have a payload or not
> drop sack
> mangle timestamps
>
With Xnetem, I ended up creating a map of config options.
More information about the Cake
mailing list