samples/bpf: xdpsock: Add clockid selection support
authorOng Boon Leong <boon.leong.ong@intel.com>
Thu, 30 Dec 2021 03:54:43 +0000 (11:54 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 6 Jan 2022 01:53:24 +0000 (17:53 -0800)
commit5a3882542acda1ac5f0a22dddf7f7f8533d3a8cc
tree0f59f7bd99c5cd76a86bd3f9aee406fbf99763c4
parent6440a6c23f6c72c57dbdf7928d92d3fc1aef6edc
samples/bpf: xdpsock: Add clockid selection support

User specifies the clock selection by using -w CLOCK or --clock=CLOCK
where CLOCK=[REALTIME, TAI, BOOTTIME, MONOTONIC].

The default CLOCK selection is MONOTONIC.

The implementation of clock selection parsing is borrowed from
iproute2/tc/q_taprio.c

Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211230035447.523177-4-boon.leong.ong@intel.com
samples/bpf/xdpsock_user.c