History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from David Miller: 1) Limit xt_hashlimit hash table size to avoid OOM or hung tasks, from Cong Wang. 2) Fix deadlock in xsk by publishing global consumer pointers when NAPI is finished, from Magnus Karlsson. 3) Set table field properly to RT_TABLE_COMPAT when necessary, from Jethro Beekman. 4) NLA_STRING attributes are not necessary NULL terminated, deal wiht that in IFLA_ALT_IFNAME. From Eric Dumazet. 5) Fix checksum handling in atlantic driver, from Dmitry Bezrukov. 6) Handle mtu==0 devices properly in wireguard, from Jason A. Donenfeld. 7) Fix several lockdep warnings in bonding, from Taehee Yoo. 8) Fix cls_flower port blocking, from Jason Baron. 9) Sanitize internal map names in libbpf, from Toke Høiland-Jørgensen. 10) Fix RDMA race in qede driver, from Michal Kalderon. 11) Fix several false lockdep warnings by adding conditions to list_for_each_entry_rcu(), from Madhuparna Bhowmik. 12) Fix sleep in atomic in mlx5 driver, from Huy Nguyen. 13) Fix potential deadlock in bpf_map_do_batch(), from Yonghong Song. 14) Hey, variables declared in switch statement before any case statements are not initialized. I learn something every day. Get rids of this stuff in several parts of the networking, from Kees Cook. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (99 commits) bnxt_en: Issue PCIe FLR in kdump kernel to cleanup pending DMAs. bnxt_en: Improve device shutdown method. net: netlink: cap max groups which will be considered in netlink_bind() net: thunderx: workaround BGX TX Underflow issue ionic: fix fw_status read net: disable BRIDGE_NETFILTER by default net: macb: Properly handle phylink on at91rm9200 s390/qeth: fix off-by-one in RX copybreak check s390/qeth: don't warn for napi with 0 budget s390/qeth: vnicc Fix EOPNOTSUPP precedence openvswitch: Distribute switch variables for initialization net: ip6_gre: Distribute switch variables for initialization net: core: Distribute switch variables for initialization udp: rehash on disconnect net/tls: Fix to avoid gettig invalid tls record bpf: Fix a potential deadlock with bpf_map_do_batch bpf: Do not grab the bucket spinlock by default on htab batch ops ice: Wait for VF to be reset/ready before configuration ice: Don't tell the OS that link is going down ice: Don't reject odd values of usecs set by user ...

Linus Torvalds committed 6 years ago

Commit 3dc55db2 parents b0dd1eb 36a44bc104 files · +1132 −506Browse files

Showing the changes to include/linux (4 of 104 files). Show all

Unified · Split

4 files
  1. include/linux/mlx5/mlx5_ifc.h +4 −1
  2. include/linux/netdevice.h +3 −4
  3. include/linux/rculist_nulls.h +7 −0
  4. include/linux/skbuff.h +30 −0
include/linux/mlx5/mlx5_ifc.h+4−1
@@ -688,7 +688,10 @@ struct mlx5_ifc_flow_table_nic_cap_bits { · 687 unmodified lines
688688 u8 nic_rx_multi_path_tirs[0x1];
689689 u8 nic_rx_multi_path_tirs_fts[0x1];
690690 u8 allow_sniffer_and_nic_rx_shared_tir[0x1];
691− u8 reserved_at_3[0x1d];
691+ u8 reserved_at_3[0x4];
692+ u8 sw_owner_reformat_supported[0x1];
693+ u8 reserved_at_8[0x18];
694+
692695 u8 encap_general_header[0x1];
693696 u8 reserved_at_21[0xa];
694697 u8 log_max_packet_reformat_context[0x5];
include/linux/netdevice.h+3−4
@@ -72,6 +72,8 @@ void netdev_set_default_ethtool_ops(struct net_device *dev, · 71 unmodified lines
7272 #define NET_RX_SUCCESS 0 /* keep 'em coming, baby */
7373 #define NET_RX_DROP 1 /* packet dropped */
7474
75+#define MAX_NEST_DEV 8
76+
7577 /*
7678 * Transmit return codes: transmit return codes originate from three different
7779 * namespaces:
@@ -4389,11 +4391,8 @@ void *netdev_lower_get_next(struct net_device *dev, · 4311 unmodified lines
43894391 ldev; \
43904392 ldev = netdev_lower_get_next(dev, &(iter)))
43914393
4392−struct net_device *netdev_all_lower_get_next(struct net_device *dev,
4394+struct net_device *netdev_next_lower_dev_rcu(struct net_device *dev,
43934395 struct list_head **iter);
4394−struct net_device *netdev_all_lower_get_next_rcu(struct net_device *dev,
4395− struct list_head **iter);
4396−
43974396 int netdev_walk_all_lower_dev(struct net_device *dev,
43984397 int (*fn)(struct net_device *lower_dev,
43994398 void *data),
include/linux/rculist_nulls.h+7−0
@@ -145,6 +145,13 @@ static inline void hlist_nulls_add_tail_rcu(struct hlist_nulls_node *n, · 144 unmodified lines
145145 }
146146 }
147147
148+/* after that hlist_nulls_del will work */
149+static inline void hlist_nulls_add_fake(struct hlist_nulls_node *n)
150+{
151+ n->pprev = &n->next;
152+ n->next = (struct hlist_nulls_node *)NULLS_MARKER(NULL);
153+}
154+
148155 /**
149156 * hlist_nulls_for_each_entry_rcu - iterate over rcu list of given type
150157 * @tpos: the type * to use as a loop cursor.
include/linux/skbuff.h+30−0
@@ -611,9 +611,15 @@ typedef unsigned char *sk_buff_data_t; · 610 unmodified lines
611611 * @next: Next buffer in list
612612 * @prev: Previous buffer in list
613613 * @tstamp: Time we arrived/left
614+ * @skb_mstamp_ns: (aka @tstamp) earliest departure time; start point
615+ * for retransmit timer
614616 * @rbnode: RB tree node, alternative to next/prev for netem/tcp
617+ * @list: queue head
615618 * @sk: Socket we are owned by
619+ * @ip_defrag_offset: (aka @sk) alternate use of @sk, used in
620+ * fragmentation management
616621 * @dev: Device we arrived on/are leaving by
622+ * @dev_scratch: (aka @dev) alternate use of @dev when @dev would be %NULL
617623 * @cb: Control buffer. Free for use by every layer. Put private vars here
618624 * @_skb_refdst: destination entry (with norefcount bit)
619625 * @sp: the security path, used for xfrm
@@ -632,6 +638,9 @@ typedef unsigned char *sk_buff_data_t; · 12 unmodified lines
632638 * @pkt_type: Packet class
633639 * @fclone: skbuff clone status
634640 * @ipvs_property: skbuff is owned by ipvs
641+ * @inner_protocol_type: whether the inner protocol is
642+ * ENCAP_TYPE_ETHER or ENCAP_TYPE_IPPROTO
643+ * @remcsum_offload: remote checksum offload is enabled
635644 * @offload_fwd_mark: Packet was L2-forwarded in hardware
636645 * @offload_l3_fwd_mark: Packet was L3-forwarded in hardware
637646 * @tc_skip_classify: do not classify packet. set by IFB device
@@ -650,6 +659,8 @@ typedef unsigned char *sk_buff_data_t; · 12 unmodified lines
650659 * @tc_index: Traffic control index
651660 * @hash: the packet hash
652661 * @queue_mapping: Queue mapping for multiqueue devices
662+ * @head_frag: skb was allocated from page fragments,
663+ * not allocated by kmalloc() or vmalloc().
653664 * @pfmemalloc: skbuff was allocated from PFMEMALLOC reserves
654665 * @active_extensions: active extensions (skb_ext_id types)
655666 * @ndisc_nodetype: router type (from link layer)
@@ -660,15 +671,28 @@ typedef unsigned char *sk_buff_data_t; · 4 unmodified lines
660671 * @wifi_acked_valid: wifi_acked was set
661672 * @wifi_acked: whether frame was acked on wifi or not
662673 * @no_fcs: Request NIC to treat last 4 bytes as Ethernet FCS
674+ * @encapsulation: indicates the inner headers in the skbuff are valid
675+ * @encap_hdr_csum: software checksum is needed
676+ * @csum_valid: checksum is already valid
663677 * @csum_not_inet: use CRC32c to resolve CHECKSUM_PARTIAL
678+ * @csum_complete_sw: checksum was completed by software
679+ * @csum_level: indicates the number of consecutive checksums found in
680+ * the packet minus one that have been verified as
681+ * CHECKSUM_UNNECESSARY (max 3)
664682 * @dst_pending_confirm: need to confirm neighbour
665683 * @decrypted: Decrypted SKB
666684 * @napi_id: id of the NAPI struct this skb came from
685+ * @sender_cpu: (aka @napi_id) source CPU in XPS
667686 * @secmark: security marking
668687 * @mark: Generic packet mark
688+ * @reserved_tailroom: (aka @mark) number of bytes of free space available
689+ * at the tail of an sk_buff
690+ * @vlan_present: VLAN tag is present
669691 * @vlan_proto: vlan encapsulation protocol
670692 * @vlan_tci: vlan tag control information
671693 * @inner_protocol: Protocol (encapsulation)
694+ * @inner_ipproto: (aka @inner_protocol) stores ipproto when
695+ * skb->inner_protocol_type == ENCAP_TYPE_IPPROTO;
672696 * @inner_transport_header: Inner transport layer header (encapsulation)
673697 * @inner_network_header: Network layer header (encapsulation)
674698 * @inner_mac_header: Link layer header (encapsulation)
@@ -750,7 +774,9 @@ struct sk_buff { · 75 unmodified lines
750774 #endif
751775 #define CLONED_OFFSET() offsetof(struct sk_buff, __cloned_offset)
752776
777+ /* private: */
753778 __u8 __cloned_offset[0];
779+ /* public: */
754780 __u8 cloned:1,
755781 nohdr:1,
756782 fclone:2,
@@ -775,7 +801,9 @@ struct sk_buff { · 18 unmodified lines
775801 #endif
776802 #define PKT_TYPE_OFFSET() offsetof(struct sk_buff, __pkt_type_offset)
777803
804+ /* private: */
778805 __u8 __pkt_type_offset[0];
806+ /* public: */
779807 __u8 pkt_type:3;
780808 __u8 ignore_df:1;
781809 __u8 nf_trace:1;
@@ -798,7 +826,9 @@ struct sk_buff { · 16 unmodified lines
798826 #define PKT_VLAN_PRESENT_BIT 0
799827 #endif
800828 #define PKT_VLAN_PRESENT_OFFSET() offsetof(struct sk_buff, __pkt_vlan_present_offset)
829+ /* private: */
801830 __u8 __pkt_vlan_present_offset[0];
831+ /* public: */
802832 __u8 vlan_present:1;
803833 __u8 csum_complete_sw:1;
804834 __u8 csum_level:2;