]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
update headers from net-next
authorStephen Hemminger <sthemmin@microsoft.com>
Fri, 17 Feb 2017 23:30:50 +0000 (15:30 -0800)
committerStephen Hemminger <sthemmin@microsoft.com>
Fri, 17 Feb 2017 23:30:50 +0000 (15:30 -0800)
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
include/linux/bpf.h
include/linux/devlink.h
include/linux/l2tp.h
include/linux/pkt_cls.h
include/linux/sctp.h
include/linux/tc_act/tc_pedit.h

index 3994b26a8e5ded350eb647c22e9b00e44ac8610b..178e20c3888529b0417af5c7912bcda592b887a4 100644 (file)
@@ -123,6 +123,12 @@ enum bpf_attach_type {
 
 #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE
 
+/* If BPF_F_ALLOW_OVERRIDE flag is used in BPF_PROG_ATTACH command
+ * to the given target_fd cgroup the descendent cgroup will be able to
+ * override effective bpf program that was inherited from this cgroup
+ */
+#define BPF_F_ALLOW_OVERRIDE   (1U << 0)
+
 #define BPF_PSEUDO_MAP_FD      1
 
 /* flags for BPF_MAP_UPDATE_ELEM command */
@@ -178,6 +184,7 @@ union bpf_attr {
                __u32           target_fd;      /* container object to attach to */
                __u32           attach_bpf_fd;  /* eBPF program to attach */
                __u32           attach_type;
+               __u32           attach_flags;
        };
 } __attribute__((aligned(8)));
 
index 7c14d77313f254aba6a497a3750fd10fb48e6e03..2ad3585b417aeb13177200b337e2113e26f46e50 100644 (file)
@@ -57,8 +57,14 @@ enum devlink_command {
        DEVLINK_CMD_SB_OCC_SNAPSHOT,
        DEVLINK_CMD_SB_OCC_MAX_CLEAR,
 
-       DEVLINK_CMD_ESWITCH_MODE_GET,
-       DEVLINK_CMD_ESWITCH_MODE_SET,
+       DEVLINK_CMD_ESWITCH_GET,
+#define DEVLINK_CMD_ESWITCH_MODE_GET /* obsolete, never use this! */ \
+       DEVLINK_CMD_ESWITCH_GET
+
+       DEVLINK_CMD_ESWITCH_SET,
+#define DEVLINK_CMD_ESWITCH_MODE_SET /* obsolete, never use this! */ \
+       DEVLINK_CMD_ESWITCH_SET
+
        /* add new commands above here */
 
        __DEVLINK_CMD_MAX,
index ac22738e459846f94e7a0b4c809775ca8506ee64..8a80007bb1ec6c9376fc3b184b6484a5ffd02dd9 100644 (file)
@@ -9,7 +9,8 @@
 
 #include <linux/types.h>
 #include <linux/socket.h>
-#include <netinet/in.h>
+#include <linux/in.h>
+#include <linux/in6.h>
 
 #define IPPROTO_L2TP           115
 
@@ -29,7 +30,7 @@ struct sockaddr_l2tpip {
        __u32           l2tp_conn_id;   /* Connection ID of tunnel */
 
        /* Pad to size of `struct sockaddr'. */
-       unsigned char   __pad[sizeof(struct sockaddr) -
+       unsigned char   __pad[__SOCK_SIZE__ -
                              sizeof(__kernel_sa_family_t) -
                              sizeof(__be16) - sizeof(struct in_addr) -
                              sizeof(__u32)];
index 345551e7141011827625c88b3e941b77b0ddbb0b..7a69f2a4ca0c06a68487ff382c6b84f8acab323b 100644 (file)
@@ -103,8 +103,10 @@ enum {
 #define TCA_POLICE_MAX (__TCA_POLICE_MAX - 1)
 
 /* tca flags definitions */
-#define TCA_CLS_FLAGS_SKIP_HW  (1 << 0)
-#define TCA_CLS_FLAGS_SKIP_SW  (1 << 1)
+#define TCA_CLS_FLAGS_SKIP_HW  (1 << 0) /* don't offload filter to HW */
+#define TCA_CLS_FLAGS_SKIP_SW  (1 << 1) /* don't use filter in SW */
+#define TCA_CLS_FLAGS_IN_HW    (1 << 2) /* filter is offloaded to HW */
+#define TCA_CLS_FLAGS_NOT_IN_HW (1 << 3) /* filter isn't offloaded to HW */
 
 /* U32 filters */
 
index bc69c1ada5c805b9f3b04643b6cee0bd88a56750..62491a5cde1dd5a39f78324c6f7cf4cdb2d71fd4 100644 (file)
@@ -117,6 +117,8 @@ typedef __s32 sctp_assoc_t;
 #define SCTP_PR_ASSOC_STATUS   115
 #define SCTP_ENABLE_STREAM_RESET       118
 #define SCTP_RESET_STREAMS     119
+#define SCTP_RESET_ASSOC       120
+#define SCTP_ADD_STREAMS       121
 
 /* PR-SCTP policies */
 #define SCTP_PR_SCTP_NONE      0x0000
@@ -1020,4 +1022,10 @@ struct sctp_reset_streams {
        uint16_t srs_stream_list[];     /* list if srs_num_streams is not 0 */
 };
 
+struct sctp_add_streams {
+       sctp_assoc_t sas_assoc_id;
+       uint16_t sas_instrms;
+       uint16_t sas_outstrms;
+};
+
 #endif /* _SCTP_H */
index 6389959a5157cf1f43338a3742093f66b14b564e..143d2b31a316624fbec24d40b7fb04da2b7eede5 100644 (file)
@@ -11,10 +11,41 @@ enum {
        TCA_PEDIT_TM,
        TCA_PEDIT_PARMS,
        TCA_PEDIT_PAD,
+       TCA_PEDIT_PARMS_EX,
+       TCA_PEDIT_KEYS_EX,
+       TCA_PEDIT_KEY_EX,
        __TCA_PEDIT_MAX
 };
 #define TCA_PEDIT_MAX (__TCA_PEDIT_MAX - 1)
                                                                                 
+enum {
+       TCA_PEDIT_KEY_EX_HTYPE = 1,
+       TCA_PEDIT_KEY_EX_CMD = 2,
+       __TCA_PEDIT_KEY_EX_MAX
+};
+#define TCA_PEDIT_KEY_EX_MAX (__TCA_PEDIT_KEY_EX_MAX - 1)
+
+ /* TCA_PEDIT_KEY_EX_HDR_TYPE_NETWROK is a special case for legacy users. It
+  * means no specific header type - offset is relative to the network layer
+  */
+enum pedit_header_type {
+       TCA_PEDIT_KEY_EX_HDR_TYPE_NETWORK = 0,
+       TCA_PEDIT_KEY_EX_HDR_TYPE_ETH = 1,
+       TCA_PEDIT_KEY_EX_HDR_TYPE_IP4 = 2,
+       TCA_PEDIT_KEY_EX_HDR_TYPE_IP6 = 3,
+       TCA_PEDIT_KEY_EX_HDR_TYPE_TCP = 4,
+       TCA_PEDIT_KEY_EX_HDR_TYPE_UDP = 5,
+       __PEDIT_HDR_TYPE_MAX,
+};
+#define TCA_PEDIT_HDR_TYPE_MAX (__PEDIT_HDR_TYPE_MAX - 1)
+
+enum pedit_cmd {
+       TCA_PEDIT_KEY_EX_CMD_SET = 0,
+       TCA_PEDIT_KEY_EX_CMD_ADD = 1,
+       __PEDIT_CMD_MAX,
+};
+#define TCA_PEDIT_CMD_MAX (__PEDIT_CMD_MAX - 1)
+
 struct tc_pedit_key {
        __u32           mask;  /* AND */
        __u32           val;   /*XOR */