Skip to content

Commit 62e9cd6

Browse files
yuwatabluca
authored andcommitted
basic/linux: update kernel headers from v6.13-rc6
This also removes README and moves the explanation about the header modification to the script.
1 parent 2144b5d commit 62e9cd6

File tree

11 files changed

+96
-21
lines changed

11 files changed

+96
-21
lines changed

src/basic/linux/README

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/basic/linux/bpf.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,6 +1116,7 @@ enum bpf_attach_type {
11161116
BPF_NETKIT_PRIMARY,
11171117
BPF_NETKIT_PEER,
11181118
BPF_TRACE_KPROBE_SESSION,
1119+
BPF_TRACE_UPROBE_SESSION,
11191120
__MAX_BPF_ATTACH_TYPE
11201121
};
11211122

@@ -1973,6 +1974,8 @@ union bpf_attr {
19731974
* program.
19741975
* Return
19751976
* The SMP id of the processor running the program.
1977+
* Attributes
1978+
* __bpf_fastcall
19761979
*
19771980
* long bpf_skb_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len, u64 flags)
19781981
* Description
@@ -3104,10 +3107,6 @@ union bpf_attr {
31043107
* with the **CONFIG_BPF_KPROBE_OVERRIDE** configuration
31053108
* option, and in this case it only works on functions tagged with
31063109
* **ALLOW_ERROR_INJECTION** in the kernel code.
3107-
*
3108-
* Also, the helper is only available for the architectures having
3109-
* the CONFIG_FUNCTION_ERROR_INJECTION option. As of this writing,
3110-
* x86 architecture is the only one to support this feature.
31113110
* Return
31123111
* 0
31133112
*
@@ -5372,7 +5371,7 @@ union bpf_attr {
53725371
* Currently, the **flags** must be 0. Currently, nr_loops is
53735372
* limited to 1 << 23 (~8 million) loops.
53745373
*
5375-
* long (\*callback_fn)(u32 index, void \*ctx);
5374+
* long (\*callback_fn)(u64 index, void \*ctx);
53765375
*
53775376
* where **index** is the current index in the loop. The index
53785377
* is zero-indexed.

src/basic/linux/btrfs.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,29 @@ struct btrfs_ioctl_encoded_io_args {
10491049
#define BTRFS_ENCODED_IO_ENCRYPTION_NONE 0
10501050
#define BTRFS_ENCODED_IO_ENCRYPTION_TYPES 1
10511051

1052+
/*
1053+
* Wait for subvolume cleaning process. This queries the kernel queue and it
1054+
* can change between the calls.
1055+
*
1056+
* - FOR_ONE - specify the subvolid
1057+
* - FOR_QUEUED - wait for all currently queued
1058+
* - COUNT - count number of queued
1059+
* - PEEK_FIRST - read which is the first in the queue (to be cleaned or being
1060+
* cleaned already), or 0 if the queue is empty
1061+
* - PEEK_LAST - read the last subvolid in the queue, or 0 if the queue is empty
1062+
*/
1063+
struct btrfs_ioctl_subvol_wait {
1064+
__u64 subvolid;
1065+
__u32 mode;
1066+
__u32 count;
1067+
};
1068+
1069+
#define BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE (0)
1070+
#define BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED (1)
1071+
#define BTRFS_SUBVOL_SYNC_COUNT (2)
1072+
#define BTRFS_SUBVOL_SYNC_PEEK_FIRST (3)
1073+
#define BTRFS_SUBVOL_SYNC_PEEK_LAST (4)
1074+
10521075
/* Error codes as returned by the kernel */
10531076
enum btrfs_err_code {
10541077
BTRFS_ERROR_DEV_RAID1_MIN_NOT_MET = 1,
@@ -1181,6 +1204,8 @@ enum btrfs_err_code {
11811204
struct btrfs_ioctl_encoded_io_args)
11821205
#define BTRFS_IOC_ENCODED_WRITE _IOW(BTRFS_IOCTL_MAGIC, 64, \
11831206
struct btrfs_ioctl_encoded_io_args)
1207+
#define BTRFS_IOC_SUBVOL_SYNC_WAIT _IOW(BTRFS_IOCTL_MAGIC, 65, \
1208+
struct btrfs_ioctl_subvol_wait)
11841209

11851210
#ifdef __cplusplus
11861211
}

src/basic/linux/ethtool.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2524,6 +2524,11 @@ struct ethtool_link_settings {
25242524
__u8 master_slave_state;
25252525
__u8 rate_matching;
25262526
__u32 reserved[7];
2527+
/* Linux builds with -Wflex-array-member-not-at-end but does
2528+
* not use the "link_mode_masks" member. Leave it defined for
2529+
* userspace for now, and when userspace wants to start using
2530+
* -Wfamnae, we'll need a new solution.
2531+
*/
25272532
__u32 link_mode_masks[];
25282533
/* layout of link_mode_masks fields:
25292534
* __u32 map_supported[link_mode_masks_nwords];

src/basic/linux/if_link.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ enum {
377377
IFLA_GSO_IPV4_MAX_SIZE,
378378
IFLA_GRO_IPV4_MAX_SIZE,
379379
IFLA_DPLL_PIN,
380+
IFLA_MAX_PACING_OFFLOAD_HORIZON,
380381
__IFLA_MAX
381382
};
382383

@@ -1290,13 +1291,28 @@ enum netkit_mode {
12901291
NETKIT_L3,
12911292
};
12921293

1294+
/* NETKIT_SCRUB_NONE leaves clearing skb->{mark,priority} up to
1295+
* the BPF program if attached. This also means the latter can
1296+
* consume the two fields if they were populated earlier.
1297+
*
1298+
* NETKIT_SCRUB_DEFAULT zeroes skb->{mark,priority} fields before
1299+
* invoking the attached BPF program when the peer device resides
1300+
* in a different network namespace. This is the default behavior.
1301+
*/
1302+
enum netkit_scrub {
1303+
NETKIT_SCRUB_NONE,
1304+
NETKIT_SCRUB_DEFAULT,
1305+
};
1306+
12931307
enum {
12941308
IFLA_NETKIT_UNSPEC,
12951309
IFLA_NETKIT_PEER_INFO,
12961310
IFLA_NETKIT_PRIMARY,
12971311
IFLA_NETKIT_POLICY,
12981312
IFLA_NETKIT_PEER_POLICY,
12991313
IFLA_NETKIT_MODE,
1314+
IFLA_NETKIT_SCRUB,
1315+
IFLA_NETKIT_PEER_SCRUB,
13001316
__IFLA_NETKIT_MAX,
13011317
};
13021318
#define IFLA_NETKIT_MAX (__IFLA_NETKIT_MAX - 1)
@@ -1940,6 +1956,7 @@ struct ifla_rmnet_flags {
19401956
enum {
19411957
IFLA_MCTP_UNSPEC,
19421958
IFLA_MCTP_NET,
1959+
IFLA_MCTP_PHYS_BINDING,
19431960
__IFLA_MCTP_MAX,
19441961
};
19451962

src/basic/linux/netfilter/nf_tables.h

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,16 +564,26 @@ enum nft_immediate_attributes {
564564
/**
565565
* enum nft_bitwise_ops - nf_tables bitwise operations
566566
*
567-
* @NFT_BITWISE_BOOL: mask-and-xor operation used to implement NOT, AND, OR and
568-
* XOR boolean operations
567+
* @NFT_BITWISE_MASK_XOR: mask-and-xor operation used to implement NOT, AND, OR
568+
* and XOR boolean operations
569569
* @NFT_BITWISE_LSHIFT: left-shift operation
570570
* @NFT_BITWISE_RSHIFT: right-shift operation
571+
* @NFT_BITWISE_AND: and operation
572+
* @NFT_BITWISE_OR: or operation
573+
* @NFT_BITWISE_XOR: xor operation
571574
*/
572575
enum nft_bitwise_ops {
573-
NFT_BITWISE_BOOL,
576+
NFT_BITWISE_MASK_XOR,
574577
NFT_BITWISE_LSHIFT,
575578
NFT_BITWISE_RSHIFT,
579+
NFT_BITWISE_AND,
580+
NFT_BITWISE_OR,
581+
NFT_BITWISE_XOR,
576582
};
583+
/*
584+
* Old name for NFT_BITWISE_MASK_XOR. Retained for backwards-compatibility.
585+
*/
586+
#define NFT_BITWISE_BOOL NFT_BITWISE_MASK_XOR
577587

578588
/**
579589
* enum nft_bitwise_attributes - nf_tables bitwise expression netlink attributes
@@ -586,6 +596,7 @@ enum nft_bitwise_ops {
586596
* @NFTA_BITWISE_OP: type of operation (NLA_U32: nft_bitwise_ops)
587597
* @NFTA_BITWISE_DATA: argument for non-boolean operations
588598
* (NLA_NESTED: nft_data_attributes)
599+
* @NFTA_BITWISE_SREG2: second source register (NLA_U32: nft_registers)
589600
*
590601
* The bitwise expression supports boolean and shift operations. It implements
591602
* the boolean operations by performing the following operation:
@@ -609,6 +620,7 @@ enum nft_bitwise_attributes {
609620
NFTA_BITWISE_XOR,
610621
NFTA_BITWISE_OP,
611622
NFTA_BITWISE_DATA,
623+
NFTA_BITWISE_SREG2,
612624
__NFTA_BITWISE_MAX
613625
};
614626
#define NFTA_BITWISE_MAX (__NFTA_BITWISE_MAX - 1)

src/basic/linux/nl80211.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2868,6 +2868,9 @@ enum nl80211_commands {
28682868
* nested item, it contains attributes defined in
28692869
* &enum nl80211_if_combination_attrs.
28702870
*
2871+
* @NL80211_ATTR_VIF_RADIO_MASK: Bitmask of allowed radios (u32).
2872+
* A value of 0 means all radios.
2873+
*
28712874
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
28722875
* @NL80211_ATTR_MAX: highest attribute number currently defined
28732876
* @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3416,6 +3419,8 @@ enum nl80211_attrs {
34163419
NL80211_ATTR_WIPHY_RADIOS,
34173420
NL80211_ATTR_WIPHY_INTERFACE_COMBINATIONS,
34183421

3422+
NL80211_ATTR_VIF_RADIO_MASK,
3423+
34193424
/* add attributes here, update the policy in nl80211.c */
34203425

34213426
__NL80211_ATTR_AFTER_LAST,
@@ -4698,6 +4703,7 @@ enum nl80211_survey_info {
46984703
* overrides all other flags.
46994704
* @NL80211_MNTR_FLAG_ACTIVE: use the configured MAC address
47004705
* and ACK incoming unicast packets.
4706+
* @NL80211_MNTR_FLAG_SKIP_TX: do not pass local tx packets
47014707
*
47024708
* @__NL80211_MNTR_FLAG_AFTER_LAST: internal use
47034709
* @NL80211_MNTR_FLAG_MAX: highest possible monitor flag
@@ -4710,6 +4716,7 @@ enum nl80211_mntr_flags {
47104716
NL80211_MNTR_FLAG_OTHER_BSS,
47114717
NL80211_MNTR_FLAG_COOK_FRAMES,
47124718
NL80211_MNTR_FLAG_ACTIVE,
4719+
NL80211_MNTR_FLAG_SKIP_TX,
47134720

47144721
/* keep last */
47154722
__NL80211_MNTR_FLAG_AFTER_LAST,
@@ -8031,6 +8038,8 @@ enum nl80211_ap_settings_flags {
80318038
* @NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION: Supported interface
80328039
* combination for this radio. Attribute may be present multiple times
80338040
* and contains attributes defined in &enum nl80211_if_combination_attrs.
8041+
* @NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK: bitmask (u32) of antennas
8042+
* connected to this radio.
80348043
*
80358044
* @__NL80211_WIPHY_RADIO_ATTR_LAST: Internal
80368045
* @NL80211_WIPHY_RADIO_ATTR_MAX: Highest attribute
@@ -8041,6 +8050,7 @@ enum nl80211_wiphy_radio_attrs {
80418050
NL80211_WIPHY_RADIO_ATTR_INDEX,
80428051
NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE,
80438052
NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION,
8053+
NL80211_WIPHY_RADIO_ATTR_ANTENNA_MASK,
80448054

80458055
/* keep last */
80468056
__NL80211_WIPHY_RADIO_ATTR_LAST,

src/basic/linux/pkt_sched.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,8 @@ enum {
836836

837837
TCA_FQ_WEIGHTS, /* Weights for each band */
838838

839+
TCA_FQ_OFFLOAD_HORIZON, /* dequeue paced packets within this horizon immediately (us units) */
840+
839841
__TCA_FQ_MAX
840842
};
841843

src/basic/linux/rtnetlink.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ enum {
174174
#define RTM_GETLINKPROP RTM_GETLINKPROP
175175

176176
RTM_NEWVLAN = 112,
177-
#define RTM_NEWNVLAN RTM_NEWVLAN
177+
#define RTM_NEWVLAN RTM_NEWVLAN
178178
RTM_DELVLAN,
179179
#define RTM_DELVLAN RTM_DELVLAN
180180
RTM_GETVLAN,

src/basic/linux/stddef.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
#define __always_inline __inline__
99
#endif
1010

11+
/* Not all C++ standards support type declarations inside an anonymous union */
12+
#ifndef __cplusplus
13+
#define __struct_group_tag(TAG) TAG
14+
#else
15+
#define __struct_group_tag(TAG)
16+
#endif
17+
1118
/**
1219
* __struct_group() - Create a mirrored named and anonyomous struct
1320
*
@@ -20,13 +27,13 @@
2027
* and size: one anonymous and one named. The former's members can be used
2128
* normally without sub-struct naming, and the latter can be used to
2229
* reason about the start, end, and size of the group of struct members.
23-
* The named struct can also be explicitly tagged for layer reuse, as well
24-
* as both having struct attributes appended.
30+
* The named struct can also be explicitly tagged for layer reuse (C only),
31+
* as well as both having struct attributes appended.
2532
*/
2633
#define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \
2734
union { \
2835
struct { MEMBERS } ATTRS; \
29-
struct TAG { MEMBERS } ATTRS NAME; \
36+
struct __struct_group_tag(TAG) { MEMBERS } ATTRS NAME; \
3037
} ATTRS
3138

3239
#ifdef __cplusplus

0 commit comments

Comments
 (0)