]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
uapi: update bpf.h
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 6 Jul 2020 17:54:35 +0000 (10:54 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 6 Jul 2020 18:00:51 +0000 (11:00 -0700)
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
include/uapi/linux/bpf.h

index 6cad1444527aa9b11d3359f0f18ba8f128ab4414..4dfcb81bb0c4c89945b17d30731bb6ba82befc71 100644 (file)
@@ -3168,7 +3168,7 @@ union bpf_attr {
  *     Return
  *             The id is returned or 0 in case the id could not be retrieved.
  *
- * void *bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
+ * int bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
  *     Description
  *             Copy *size* bytes from *data* into a ring buffer *ringbuf*.
  *             If BPF_RB_NO_WAKEUP is specified in *flags*, no notification of
@@ -3761,6 +3761,19 @@ struct xdp_md {
        __u32 egress_ifindex;  /* txq->dev->ifindex */
 };
 
+/* DEVMAP map-value layout
+ *
+ * The struct data-layout of map-value is a configuration interface.
+ * New members can only be added to the end of this structure.
+ */
+struct bpf_devmap_val {
+       __u32 ifindex;   /* device index */
+       union {
+               int   fd;  /* prog fd on map write */
+               __u32 id;  /* prog id on map read */
+       } bpf_prog;
+};
+
 enum sk_action {
        SK_DROP = 0,
        SK_PASS,