summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/bitmap.h95
-rw-r--r--include/linux/bitops.h23
-rw-r--r--include/linux/bpf.h31
-rw-r--r--include/linux/bpf_crypto.h24
-rw-r--r--include/linux/bpf_verifier.h11
-rw-r--r--include/linux/btf_ids.h2
-rw-r--r--include/linux/compiler_types.h11
-rw-r--r--include/linux/cpumask.h2
-rw-r--r--include/linux/dynamic_queue_limits.h50
-rw-r--r--include/linux/etherdevice.h12
-rw-r--r--include/linux/ethtool.h27
-rw-r--r--include/linux/filter.h51
-rw-r--r--include/linux/genetlink.h19
-rw-r--r--include/linux/genl_magic_struct.h2
-rw-r--r--include/linux/ieee80211.h30
-rw-r--r--include/linux/linkmode.h27
-rw-r--r--include/linux/marvell_phy.h3
-rw-r--r--include/linux/mhi.h18
-rw-r--r--include/linux/mlx5/cq.h7
-rw-r--r--include/linux/mlx5/device.h8
-rw-r--r--include/linux/mlx5/driver.h10
-rw-r--r--include/linux/mlx5/mlx5_ifc.h63
-rw-r--r--include/linux/mmc/sdio_ids.h1
-rw-r--r--include/linux/net/intel/libie/rx.h50
-rw-r--r--include/linux/netdevice.h55
-rw-r--r--include/linux/phy.h1
-rw-r--r--include/linux/phylink.h42
-rw-r--r--include/linux/pse-pd/pse.h83
-rw-r--r--include/linux/rhashtable.h10
-rw-r--r--include/linux/rtnetlink.h3
-rw-r--r--include/linux/sfp.h4
-rw-r--r--include/linux/skbuff.h115
-rw-r--r--include/linux/skbuff_ref.h75
-rw-r--r--include/linux/skmsg.h4
-rw-r--r--include/linux/slab.h17
-rw-r--r--include/linux/ssb/ssb.h8
-rw-r--r--include/linux/stmmac.h18
-rw-r--r--include/linux/sysctl.h2
-rw-r--r--include/linux/tcp.h6
-rw-r--r--include/linux/trace_events.h36
-rw-r--r--include/linux/virtio.h35
-rw-r--r--include/net/af_unix.h33
-rw-r--r--include/net/ax25.h5
-rw-r--r--include/net/bluetooth/bluetooth.h2
-rw-r--r--include/net/bluetooth/hci.h136
-rw-r--r--include/net/bluetooth/hci_core.h69
-rw-r--r--include/net/bluetooth/l2cap.h33
-rw-r--r--include/net/cfg80211.h140
-rw-r--r--include/net/cipso_ipv4.h6
-rw-r--r--include/net/devlink.h21
-rw-r--r--include/net/dsa.h38
-rw-r--r--include/net/dscp.h76
-rw-r--r--include/net/dst_cache.h2
-rw-r--r--include/net/dst_metadata.h10
-rw-r--r--include/net/espintcp.h2
-rw-r--r--include/net/flow_dissector.h2
-rw-r--r--include/net/flow_offload.h57
-rw-r--r--include/net/genetlink.h10
-rw-r--r--include/net/gre.h70
-rw-r--r--include/net/gro.h82
-rw-r--r--include/net/gtp.h5
-rw-r--r--include/net/hotdata.h3
-rw-r--r--include/net/ieee8021q.h57
-rw-r--r--include/net/inet_connection_sock.h7
-rw-r--r--include/net/inet_timewait_sock.h2
-rw-r--r--include/net/ip.h4
-rw-r--r--include/net/ip6_fib.h8
-rw-r--r--include/net/ip6_route.h11
-rw-r--r--include/net/ip6_tunnel.h4
-rw-r--r--include/net/ip_tunnels.h139
-rw-r--r--include/net/libeth/rx.h242
-rw-r--r--include/net/mac80211.h82
-rw-r--r--include/net/mana/mana.h1
-rw-r--r--include/net/mptcp.h3
-rw-r--r--include/net/netdev_queues.h61
-rw-r--r--include/net/netfilter/nf_tables.h4
-rw-r--r--include/net/netlabel.h12
-rw-r--r--include/net/netlink.h41
-rw-r--r--include/net/nexthop.h2
-rw-r--r--include/net/page_pool/helpers.h34
-rw-r--r--include/net/page_pool/types.h4
-rw-r--r--include/net/pfcp.h90
-rw-r--r--include/net/pkt_cls.h9
-rw-r--r--include/net/proto_memory.h83
-rw-r--r--include/net/red.h12
-rw-r--r--include/net/request_sock.h4
-rw-r--r--include/net/route.h22
-rw-r--r--include/net/rps.h28
-rw-r--r--include/net/rstreason.h182
-rw-r--r--include/net/sch_generic.h5
-rw-r--r--include/net/scm.h10
-rw-r--r--include/net/smc.h24
-rw-r--r--include/net/sock.h88
-rw-r--r--include/net/tcp.h68
-rw-r--r--include/net/timewait_sock.h9
-rw-r--r--include/net/tls.h2
-rw-r--r--include/net/udp_tunnel.h4
-rw-r--r--include/net/xfrm.h1
-rw-r--r--include/trace/bpf_probe.h3
-rw-r--r--include/trace/events/bpf_test_run.h17
-rw-r--r--include/trace/events/icmp.h67
-rw-r--r--include/trace/events/mdio.h2
-rw-r--r--include/trace/events/net_probe_common.h71
-rw-r--r--include/trace/events/sock.h37
-rw-r--r--include/trace/events/tcp.h134
-rw-r--r--include/trace/events/udp.h29
-rw-r--r--include/uapi/linux/bpf.h44
-rw-r--r--include/uapi/linux/devlink.h1
-rw-r--r--include/uapi/linux/ethtool.h55
-rw-r--r--include/uapi/linux/ethtool_netlink.h32
-rw-r--r--include/uapi/linux/gtp.h3
-rw-r--r--include/uapi/linux/icmpv6.h1
-rw-r--r--include/uapi/linux/if_link.h3
-rw-r--r--include/uapi/linux/if_team.h116
-rw-r--r--include/uapi/linux/if_tunnel.h36
-rw-r--r--include/uapi/linux/mptcp.h4
-rw-r--r--include/uapi/linux/netdev.h21
-rw-r--r--include/uapi/linux/nl80211.h236
-rw-r--r--include/uapi/linux/pkt_cls.h14
-rw-r--r--include/uapi/linux/snmp.h2
-rw-r--r--include/uapi/linux/tcp.h2
-rw-r--r--include/uapi/linux/udp.h2
-rw-r--r--include/uapi/linux/virtio_bt.h1
-rw-r--r--include/uapi/linux/virtio_net.h143
-rw-r--r--include/uapi/linux/xfrm.h6
125 files changed, 3143 insertions, 1191 deletions
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index aa4096126553..8c4768c44a01 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -83,6 +83,10 @@ struct device;
* bitmap_to_arr64(buf, src, nbits) Copy nbits from buf to u64[] dst
* bitmap_get_value8(map, start) Get 8bit value from map at start
* bitmap_set_value8(map, value, start) Set 8bit value to map at start
+ * bitmap_read(map, start, nbits) Read an nbits-sized value from
+ * map at start
+ * bitmap_write(map, value, start, nbits) Write an nbits-sized value to
+ * map at start
*
* Note, bitmap_zero() and bitmap_fill() operate over the region of
* unsigned longs, that is, bits behind bitmap till the unsigned long
@@ -222,9 +226,11 @@ void bitmap_fold(unsigned long *dst, const unsigned long *orig,
#define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) & (BITS_PER_LONG - 1)))
#define BITMAP_LAST_WORD_MASK(nbits) (~0UL >> (-(nbits) & (BITS_PER_LONG - 1)))
+#define bitmap_size(nbits) (ALIGN(nbits, BITS_PER_LONG) / BITS_PER_BYTE)
+
static inline void bitmap_zero(unsigned long *dst, unsigned int nbits)
{
- unsigned int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long);
+ unsigned int len = bitmap_size(nbits);
if (small_const_nbits(nbits))
*dst = 0;
@@ -234,7 +240,7 @@ static inline void bitmap_zero(unsigned long *dst, unsigned int nbits)
static inline void bitmap_fill(unsigned long *dst, unsigned int nbits)
{
- unsigned int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long);
+ unsigned int len = bitmap_size(nbits);
if (small_const_nbits(nbits))
*dst = ~0UL;
@@ -245,7 +251,7 @@ static inline void bitmap_fill(unsigned long *dst, unsigned int nbits)
static inline void bitmap_copy(unsigned long *dst, const unsigned long *src,
unsigned int nbits)
{
- unsigned int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long);
+ unsigned int len = bitmap_size(nbits);
if (small_const_nbits(nbits))
*dst = *src;
@@ -722,38 +728,83 @@ static inline void bitmap_from_u64(unsigned long *dst, u64 mask)
}
/**
- * bitmap_get_value8 - get an 8-bit value within a memory region
+ * bitmap_read - read a value of n-bits from the memory region
* @map: address to the bitmap memory region
- * @start: bit offset of the 8-bit value; must be a multiple of 8
+ * @start: bit offset of the n-bit value
+ * @nbits: size of value in bits, nonzero, up to BITS_PER_LONG
*
- * Returns the 8-bit value located at the @start bit offset within the @src
- * memory region.
+ * Returns: value of @nbits bits located at the @start bit offset within the
+ * @map memory region. For @nbits = 0 and @nbits > BITS_PER_LONG the return
+ * value is undefined.
*/
-static inline unsigned long bitmap_get_value8(const unsigned long *map,
- unsigned long start)
+static inline unsigned long bitmap_read(const unsigned long *map,
+ unsigned long start,
+ unsigned long nbits)
{
- const size_t index = BIT_WORD(start);
- const unsigned long offset = start % BITS_PER_LONG;
+ size_t index = BIT_WORD(start);
+ unsigned long offset = start % BITS_PER_LONG;
+ unsigned long space = BITS_PER_LONG - offset;
+ unsigned long value_low, value_high;
+
+ if (unlikely(!nbits || nbits > BITS_PER_LONG))
+ return 0;
+
+ if (space >= nbits)
+ return (map[index] >> offset) & BITMAP_LAST_WORD_MASK(nbits);
- return (map[index] >> offset) & 0xFF;
+ value_low = map[index] & BITMAP_FIRST_WORD_MASK(start);
+ value_high = map[index + 1] & BITMAP_LAST_WORD_MASK(start + nbits);
+ return (value_low >> offset) | (value_high << space);
}
/**
- * bitmap_set_value8 - set an 8-bit value within a memory region
+ * bitmap_write - write n-bit value within a memory region
* @map: address to the bitmap memory region
- * @value: the 8-bit value; values wider than 8 bits may clobber bitmap
- * @start: bit offset of the 8-bit value; must be a multiple of 8
+ * @value: value to write, clamped to nbits
+ * @start: bit offset of the n-bit value
+ * @nbits: size of value in bits, nonzero, up to BITS_PER_LONG.
+ *
+ * bitmap_write() behaves as-if implemented as @nbits calls of __assign_bit(),
+ * i.e. bits beyond @nbits are ignored:
+ *
+ * for (bit = 0; bit < nbits; bit++)
+ * __assign_bit(start + bit, bitmap, val & BIT(bit));
+ *
+ * For @nbits == 0 and @nbits > BITS_PER_LONG no writes are performed.
*/
-static inline void bitmap_set_value8(unsigned long *map, unsigned long value,
- unsigned long start)
-{
- const size_t index = BIT_WORD(start);
- const unsigned long offset = start % BITS_PER_LONG;
-
- map[index] &= ~(0xFFUL << offset);
+static inline void bitmap_write(unsigned long *map, unsigned long value,
+ unsigned long start, unsigned long nbits)
+{
+ size_t index;
+ unsigned long offset;
+ unsigned long space;
+ unsigned long mask;
+ bool fit;
+
+ if (unlikely(!nbits || nbits > BITS_PER_LONG))
+ return;
+
+ mask = BITMAP_LAST_WORD_MASK(nbits);
+ value &= mask;
+ offset = start % BITS_PER_LONG;
+ space = BITS_PER_LONG - offset;
+ fit = space >= nbits;
+ index = BIT_WORD(start);
+