From: David S. Miller Date: Sat, 23 Apr 2016 22:26:24 +0000 (-0400) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1602f49b58ab;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge git://git./linux/kernel/git/davem/net Conflicts were two cases of simple overlapping changes, nothing serious. In the UDP case, we need to add a hlist_add_tail_rcu() to linux/rculist.h, because we've moved UDP socket handling away from using nulls lists. Signed-off-by: David S. Miller --- 1602f49b58abcb0d34a5f0a29d68e7c1769547aa diff --cc drivers/net/ethernet/intel/i40e/i40e_txrx.h index 77ccdde56c0c,a9bd70537d65..6b2b1913527d --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h @@@ -442,20 -413,14 +442,24 @@@ static inline int i40e_maybe_stop_tx(st **/ static inline bool i40e_chk_linearize(struct sk_buff *skb, int count) { - /* we can only support up to 8 data buffers for a single send */ - if (likely(count <= I40E_MAX_BUFFER_TXD)) + /* Both TSO and single send will work if count is less than 8 */ + if (likely(count < I40E_MAX_BUFFER_TXD)) return false; - return __i40e_chk_linearize(skb); + if (skb_is_gso(skb)) + return __i40e_chk_linearize(skb); + + /* we can support up to 8 data buffers for a single send */ + return count != I40E_MAX_BUFFER_TXD; } + +/** + * i40e_rx_is_fcoe - returns true if the Rx packet type is FCoE + * @ptype: the packet type field from Rx descriptor write-back + **/ +static inline bool i40e_rx_is_fcoe(u16 ptype) +{ + return (ptype >= I40E_RX_PTYPE_L2_FCOE_PAY3) && + (ptype <= I40E_RX_PTYPE_L2_FCOE_VFT_FCOTHER); +} #endif /* _I40E_TXRX_H_ */ diff --cc drivers/net/ethernet/intel/i40evf/i40e_txrx.h index 84c28aa64fdf,0429553fe887..54b52e8f7097 --- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h +++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h @@@ -424,20 -395,14 +424,24 @@@ static inline int i40e_maybe_stop_tx(st **/ static inline bool i40e_chk_linearize(struct sk_buff *skb, int count) { - /* we can only support up to 8 data buffers for a single send */ - if (likely(count <= I40E_MAX_BUFFER_TXD)) + /* Both TSO and single send will work if count is less than 8 */ + if (likely(count < I40E_MAX_BUFFER_TXD)) return false; - return __i40evf_chk_linearize(skb); + if (skb_is_gso(skb)) + return __i40evf_chk_linearize(skb); + + /* we can support up to 8 data buffers for a single send */ + return count != I40E_MAX_BUFFER_TXD; } + +/** + * i40e_rx_is_fcoe - returns true if the Rx packet type is FCoE + * @ptype: the packet type field from Rx descriptor write-back + **/ +static inline bool i40e_rx_is_fcoe(u16 ptype) +{ + return (ptype >= I40E_RX_PTYPE_L2_FCOE_PAY3) && + (ptype <= I40E_RX_PTYPE_L2_FCOE_VFT_FCOTHER); +} #endif /* _I40E_TXRX_H_ */ diff --cc drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 656541c5360a,d278399097dc..8bfb8e06a90c --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c @@@ -782,15 -761,8 +782,13 @@@ static void iwl_op_mode_mvm_stop(struc for (i = 0; i < NVM_MAX_NUM_SECTIONS; i++) kfree(mvm->nvm_sections[i].data); - iwl_free_fw_paging(mvm); - iwl_mvm_tof_clean(mvm); + del_timer_sync(&mvm->scan_timer); + + mutex_destroy(&mvm->mutex); + mutex_destroy(&mvm->d0i3_suspend_mutex); + ieee80211_free_hw(mvm->hw); } diff --cc include/linux/rculist.h index 17d4f849c65e,17d4f849c65e..8beb98dcf14f --- a/include/linux/rculist.h +++ b/include/linux/rculist.h @@@ -487,6 -487,6 +487,42 @@@ static inline void hlist_add_head_rcu(s first->pprev = &n->next; } ++/** ++ * hlist_add_tail_rcu ++ * @n: the element to add to the hash list. ++ * @h: the list to add to. ++ * ++ * Description: ++ * Adds the specified element to the specified hlist, ++ * while permitting racing traversals. ++ * ++ * The caller must take whatever precautions are necessary ++ * (such as holding appropriate locks) to avoid racing ++ * with another list-mutation primitive, such as hlist_add_head_rcu() ++ * or hlist_del_rcu(), running on this same list. ++ * However, it is perfectly legal to run concurrently with ++ * the _rcu list-traversal primitives, such as ++ * hlist_for_each_entry_rcu(), used to prevent memory-consistency ++ * problems on Alpha CPUs. Regardless of the type of CPU, the ++ * list-traversal primitive must be guarded by rcu_read_lock(). ++ */ ++static inline void hlist_add_tail_rcu(struct hlist_node *n, ++ struct hlist_head *h) ++{ ++ struct hlist_node *i, *last = NULL; ++ ++ for (i = hlist_first_rcu(h); i; i = hlist_next_rcu(i)) ++ last = i; ++ ++ if (last) { ++ n->next = last->next; ++ n->pprev = &last->next; ++ rcu_assign_pointer(hlist_next_rcu(last), n); ++ } else { ++ hlist_add_head_rcu(n, h); ++ } ++} ++ /** * hlist_add_before_rcu * @n: the new element to add to the hash list. diff --cc net/ipv4/udp.c index 37e09c3dd046,a2e7f55a1f61..76ea0a8be090 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@@ -336,8 -339,13 +336,13 @@@ found hslot2 = udp_hashslot2(udptable, udp_sk(sk)->udp_portaddr_hash); spin_lock(&hslot2->lock); - hlist_add_head_rcu(&udp_sk(sk)->udp_portaddr_node, - &hslot2->head); + if (IS_ENABLED(CONFIG_IPV6) && sk->sk_reuseport && - sk->sk_family == AF_INET6) - hlist_nulls_add_tail_rcu(&udp_sk(sk)->udp_portaddr_node, - &hslot2->head); ++ sk->sk_family == AF_INET6) ++ hlist_add_tail_rcu(&udp_sk(sk)->udp_portaddr_node, ++ &hslot2->head); + else - hlist_nulls_add_head_rcu(&udp_sk(sk)->udp_portaddr_node, - &hslot2->head); ++ hlist_add_head_rcu(&udp_sk(sk)->udp_portaddr_node, ++ &hslot2->head); hslot2->count++; spin_unlock(&hslot2->lock); }