aboutsummaryrefslogtreecommitdiffstats
path: root/lib (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2015-03-06switchdev: add IPv4 fib ndo ops wrappersScott Feldman2-0/+58
Add IPv4 fib ndo wrapper funcs and stub them out for now. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-06netdevice: add IPv4 fib add/del opsScott Feldman1-0/+22
Add two new ndo ops for IPv4 fib offload support, add and del. Add uses modifiy semantics if fib entry already offloaded. Drivers implementing the new ndo ops will return err<0 if programming device fails, for example if device's tables are full. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-06rtnetlink: add RTNH_F_EXTERNAL flag for fib offloadScott Feldman1-0/+1
Add new RTNH_F_EXTERNAL flag to mark fib entries offloaded externally, for example to a switchdev switch device. Signed-off-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-06tg3: use napi_complete_done()Eric Dumazet1-2/+2
Using napi_complete_done() instead of napi_complete() allows us to use /sys/class/net/ethX/gro_flush_timeout GRO layer can aggregate more packets if the flush is delayed a bit, without having to set too big coalescing parameters that impact latencies. Tested: lpx:~# echo 0 >/sys/class/net/eth1/gro_flush_timeout lpx:~# sar -n DEV 1 10 | grep eth1 10:36:25 AM eth1 81290.00 40617.00 120479.67 2777.01 0.00 0.00 0.00 10:36:26 AM eth1 81283.00 40608.00 120481.81 2778.13 0.00 0.00 1.00 10:36:27 AM eth1 81304.00 40639.00 120518.42 2778.28 0.00 0.00 0.00 10:36:28 AM eth1 81255.00 40605.00 120437.34 2775.95 0.00 0.00 1.00 10:36:29 AM eth1 81306.00 40630.00 120521.44 2777.70 0.00 0.00 0.00 10:36:30 AM eth1 81286.00 40564.00 120480.20 2773.31 0.00 0.00 0.00 10:36:31 AM eth1 81256.00 40599.00 120438.81 2776.27 0.00 0.00 0.00 10:36:32 AM eth1 81287.00 40594.00 120480.69 2776.69 0.00 0.00 0.00 10:36:33 AM eth1 81279.00 40601.00 120478.53 2775.84 0.00 0.00 0.00 10:36:34 AM eth1 81277.00 40610.00 120476.94 2776.25 0.00 0.00 0.00 Average: eth1 81282.30 40606.70 120479.39 2776.54 0.00 0.00 0.20 lpx:~# echo 13000 >/sys/class/net/eth1/gro_flush_timeout lpx:~# sar -n DEV 1 10 | grep eth1 10:36:43 AM eth1 81257.00 7747.00 120437.44 530.00 0.00 0.00 0.00 10:36:44 AM eth1 81278.00 7748.00 120480.00 529.85 0.00 0.00 0.00 10:36:45 AM eth1 81282.00 7752.00 120479.09 531.09 0.00 0.00 0.00 10:36:46 AM eth1 81282.00 7751.00 120478.80 530.90 0.00 0.00 0.00 10:36:47 AM eth1 81276.00 7745.00 120478.31 529.64 0.00 0.00 0.00 10:36:48 AM eth1 81278.00 7747.00 120478.50 529.81 0.00 0.00 0.00 10:36:49 AM eth1 81282.00 7749.00 120478.88 530.01 0.00 0.00 0.00 10:36:50 AM eth1 81284.00 7751.00 120481.52 530.20 0.00 0.00 0.00 10:36:51 AM eth1 81299.00 7769.00 120481.74 533.81 0.00 0.00 0.00 10:36:52 AM eth1 81281.00 7748.00 120478.62 529.96 0.00 0.00 0.00 Average: eth1 81279.90 7750.70 120475.29 530.53 0.00 0.00 0.00 Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-06net: dsa: extract dsa switch tree setup and removalFlorian Fainelli1-39/+52
Extract the core logic that setups a 'struct dsa_switch_tree' and removes it, update dsa_probe() and dsa_remove() to use the two helper functions. This will be useful to allow for other callers to setup this structure differently. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-06net: dsa: let switches specify their tagging protocolFlorian Fainelli2-2/+8
In order to support the new DSA device driver model, a dsa_switch should be able to advertise the type of tagging protocol supported by the underlying switch device. This also removes constraints on how tagging can be stacked to each other. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-06net: dsa: split dsa_switch_setup into two functionsFlorian Fainelli1-37/+51
Split the part of dsa_switch_setup() which is responsible for allocating and initializing a 'struct dsa_switch' and the part which is doing a given switch device setup and slave network device creation. This is a preliminary change to allow a separate caller of dsa_switch_setup_one() which may have externally initialized the dsa_switch structure, outside of dsa_switch_setup(). Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-06net: dsa: allow deferred probingFlorian Fainelli1-3/+3
In preparation for allowing a different model to register DSA switches, update dsa_of_probe() and dsa_probe() to return -EPROBE_DEFER where appropriate. Failure to find a phandle or Device Tree property is still fatal, but looking up the internal device structure associated with a Device Tree node is something that might need to be delayed based on driver probe ordering. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-06net: dsa: update dsa_of_{probe, remove} to use a device pointerFlorian Fainelli1-12/+12
In preparation for allowing a different mechanism to register DSA switch devices and driver, update dsa_of_probe and dsa_of_remove to take a struct device pointer since neither of these two functions uses the struct platform_device pointer. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05inet_diag: remove duplicate code from inet_twsk_diag_dump()Eric Dumazet1-24/+31
timewait sockets now share a common base with established sockets. inet_twsk_diag_dump() can use inet_diag_bc_sk() instead of duplicating code, granted that inet_diag_bc_sk() does proper userlocks initialization. twsk_build_assert() will catch any future changes that could break the assumptions. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05i40e: Fix mismatching type for ioremap_lenJeff Kirsher1-2/+2
As pointed out by Ben Hutchings, ioremap uses unsigned long as its parameter type, so we should be using that instead of u32 or int. Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05tipc: add ip/udp media typeErik Hugne7-8/+479
The ip/udp bearer can be configured in a point-to-point mode by specifying both local and remote ip/hostname, or it can be enabled in multicast mode, where links are established to all tipc nodes that have joined the same multicast group. The multicast IP address is generated based on the TIPC network ID, but can be overridden by using another multicast address as remote ip. Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05tipc: increase size of tipc discovery messagesErik Hugne1-4/+3
The payload area following the TIPC discovery message header is an opaque area defined by the media. INT_H_SIZE was enough for Ethernet/IB/IPv4 but needs to be expanded to carry IPv6 addressing information. Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05net_sched: move tp->root allocation into fw_init()WANG Cong1-10/+13
Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05net_sched: move tp->root allocation into route4_init()WANG Cong1-7/+7
Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05mpls: using vzalloc requires including vmalloc.hStephen Rothwell1-0/+1
Fixes this build error: net/mpls/af_mpls.c: In function 'resize_platform_label_table': net/mpls/af_mpls.c:767:4: error: implicit declaration of function 'vzalloc' [-Werror=implicit-function-declaration] labels = vzalloc(size); ^ Fixes: 7720c01f3f59 ("mpls: Add a sysctl to control the size of the mpls label table") Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05cxgb4: Try and provide an RDMA CIQ per cpuHariprasad Shenai3-17/+46
To allow for better scalability on systems with large core counts, we will try and allocate enough RDMA Concentrator IQs and MSI/X vectors as we have cores. If we cannot get enough MSI/X vectors, fall back to the minimum required: 1 per adapter rx channel. Also clean up cxgb_enable_msix() to make it readable and correct a bug where the vectors are not correctly assigned if the driver doesn't get the full amount requested. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05cxgb4: Move offload Rx queue allocation to separate functionHariprasad Shenai1-38/+35
Adds a common function for all Rx queue allocation. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05bridge: Extend Proxy ARP design to allow optional rules for Wi-FiJouni Malinen7-8/+22
This extends the design in commit 958501163ddd ("bridge: Add support for IEEE 802.11 Proxy ARP") with optional set of rules that are needed to meet the IEEE 802.11 and Hotspot 2.0 requirements for ProxyARP. The previously added BR_PROXYARP behavior is left as-is and a new BR_PROXYARP_WIFI alternative is added so that this behavior can be configured from user space when required. In addition, this enables proxyarp functionality for unicast ARP requests for both BR_PROXYARP and BR_PROXYARP_WIFI since it is possible to use unicast as well as broadcast for these frames. The key differences in functionality: BR_PROXYARP: - uses the flag on the bridge port on which the request frame was received to determine whether to reply - block bridge port flooding completely on ports that enable proxy ARP BR_PROXYARP_WIFI: - uses the flag on the bridge port to which the target device of the request belongs - block bridge port flooding selectively based on whether the proxyarp functionality replied Signed-off-by: Jouni Malinen <jouni@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05ax25: Fix the build when CONFIG_INET is disabledkbuild test robot1-1/+1
> > >> net/ax25/ax25_ip.c:225:26: error: unknown type name 'sturct' > netdev_tx_t ax25_ip_xmit(sturct sk_buff *skb) > ^ > > vim +/sturct +225 net/ax25/ax25_ip.c > > 219 unsigned short type, const void *daddr, > 220 const void *saddr, unsigned int len) > 221 { > 222 return -AX25_HEADER_LEN; > 223 } > 224 > > 225 netdev_tx_t ax25_ip_xmit(sturct sk_buff *skb) > 226 { > 227 kfree_skb(skb); > 228 return NETDEV_TX_OK; Ooops I misspelled struct... Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-05i40e/i40evf: Version bumpSravanthi Tangeda2-2/+2
Bump i40e to 1.2.11 and i40evf to 1.2.5 Change-ID: Ie13375941606b0a027e5b5dbc235f5f5f03b75c8 Signed-off-by: Sravanthi Tangeda <sravanthi.tangeda@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05i40e: don't spam the system logMitch A Williams1-3/+0
The PF driver spams the system log with messages about VF VSI when VFs are created, as well as each time they are reset. This is annoying, and the information isn't even useful most of the time. Remove this message to reduce user annoyance. Change-ID: I8de90d05380f54b038c9c8c3265150be87c9242c Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05i40e: move IRQ tracking setup into MSIX setupShannon Nelson1-31/+29
Move the IRQ tracking setup and teardown into the same routines that do the IRQ setup and teardown. This keeps like activities together and allows us to track exactly the number of vectors reserved from the OS, which may be fewer than are available from the HW. Change-ID: I6b2b1a955c5f0ac6b94c3084304ed0b2ea6777cf Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05i40e: Ioremap changesAnjali Singhai2-2/+7
For future device support we do not want to map the whole CSR space since some of it is mapped by other drivers with different mapping methods. Note: As a side effect, the flash region (if exposed through the memory map) gets unmapped too since it follows the future use region. Change-ID: Ic729a2eacd692984220b1a415ff4fa0f98ea419a Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05i40e/i40evf: Clean up some formatting and other thingsJesse Brandeburg8-10/+2
Fix some double blank lines and un-split a function declaration that all fits on one line. Also make i40e_get_priv_flags static. Change-ID: I11b5d25d1153a06b286d0d2f5d916d7727c58e4a Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05i40e: Add AOC PHY types to case statementsCatherine Sullivan2-0/+4
Add the 10G and 40G AOC PHY types to the case statement in get_media_type and ethtool get_settings so that the correct information gets reported back to the user. Change-ID: I1b4849d22199a9acf7c8807166d0317c1faad375 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05i40e: Fix ethtool offline testGreg Rose1-0/+10
If the system administrator is requesting an offline diagnostic test using 'ethtool -t' then we should, you know, actually take the device offline before doing the testing. Change-ID: I6afa1cbfcc821c9ab6e6f47ed4d8dc2d8dd20e82 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05i40e: Reassign incorrect PHY type to fix a FW bugCatherine Sullivan1-0/+4
Some FW versions are incorrectly reporting a breakout cable as PHY type 0x3 when it should be 0x16 (I40E_PHY_TYPE_10GBASE_SFPP_CU). If we get this value back from FW and the version is < 4.40, reassign it to I40E_PHY_TYPE_10GBASE_SFPP_CU. Change-ID: Ibb41a0e3cd2c0753744e8553959240df6ed13ae8 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05i40e: fix XPS mask when resettingJesse Brandeburg1-11/+11
During resets (possibly caused by a Tx hang) the driver would accidentally clear the XPS mask for all queues back to 0. This caused higher CPU utilization and had some other performance impacts for transmit tests. Change-ID: I95f112432c9e643a153eaa31cd28cdcbfdd01831 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05i40e: use more portable sign extensionJesse Brandeburg1-2/+2
Use automatic sign extension by replacing 0xffff... constants with ~(u64)0 or ~(u32)0. Change-ID: I73cab4cd2611795bb12e00f0f24fafaaee07457c Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05i40e/i40evf: grab NVM devstarter version not image versionShannon Nelson3-3/+4
0x2A is the NVM version so it has useful data but it is per image version every image can have a different one. 0x18 is the dev starter version which all the images for release will have the same version. Of the two 0x18 is more useful and is what should be displayed. Change-ID: Idf493da13a42ab211e2de0bef287f5de51033cca Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05i40e: Don't check operational or sync bit for App TLVNeerav Parikh1-1/+1
In CEE mode the firmware does not set the operational status bit of the application TLV status as returned from the "Get CEE DCBX Oper Cfg" AQ command. This occurs whenever a DCBX configuration is changed. This is a workaround to remove the check for the operational and sync bits of the application TLV status till a firmware fix is provided. Change-ID: I1a31ff2fcadcb06feb5b55776a33593afc6ea176 Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Acked-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05i40e: during LED interaction ignore activity LED src modesMatt Jared1-1/+34
Modify our get and set LED functions so they ignore activity LEDs, as we are required to blink the link LEDs only. Change-ID: I647ea67a6fc95cbbab6e3cd01d81ec9ae096a9ad Signed-off-by: Matt Jared <matthew.a.jared@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-05i40e: Fix NPAR Tx Scheduler initGreg Rose1-0/+4
Recent changes to the driver initialization have caused the BW configurations to not take effect. We use a BW configuration read and write back to "kick" the Tx scheduler into action. Change-ID: I94ab377c58d3a3986e3de62b6c199be3fd2ee5e6 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-03-04net: bcmgenet: simplify __bcmgenet_tx_reclaim()Petri Gynther2-24/+22
1. Use c_index and ring->c_index to determine how many TxCBs/TxBDs are ready for cleanup - c_index = the current value of TDMA_CONS_INDEX - TDMA_CONS_INDEX is HW-incremented and auto-wraparound (0x0-0xFFFF) - ring->c_index = __bcmgenet_tx_reclaim() cleaned up to this point on the previous invocation 2. Add bcmgenet_tx_ring->clean_ptr - index of the next TxCB to be cleaned - incremented as TxCBs/TxBDs are processed - value always in range [ring->cb_ptr, ring->end_ptr] 3. Fix incrementing of dev->stats.tx_packets - should be incremented only when tx_cb_ptr->skb != NULL These changes simplify __bcmgenet_tx_reclaim(). Furthermore, Tx ring size can now be any value. With the old code, Tx ring size had to be a power-of-2: num_tx_bds = ring->size; c_index &= (num_tx_bds - 1); last_c_index &= (num_tx_bds - 1); Signed-off-by: Petri Gynther <pgynther@google.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04fib_trie: Prevent allocating tnode if bits is too big for size_tAlexander Duyck1-3/+13
This patch adds code to prevent us from attempting to allocate a tnode with a size larger than what can be represented by size_t. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04fib_trie: Update last spot w/ idx >> n->bits code and explanationAlexander Duyck1-5/+13
This change updates the fib_table_lookup function so that it is in sync with the fib_find_node function in terms of the explanation for the index check based on the bits value. I have also updated it from doing a mask to just doing a compare as I have found that seems to provide more options to the compiler as I have seen it turn this into a shift of the value and test under some circumstances. In addition I addressed one minor issue in which we kept computing the key ^ n->key when checking the fib aliases. I pulled the xor out of the loop in order to reduce the number of memory reads in the lookup. As a result we should save a couple cycles since the xor is only done once much earlier in the lookup. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04fib_trie: Make fib_table rcu safeAlexander Duyck4-52/+98
The fib_table was wrapped in several places with an rcu_read_lock/rcu_read_unlock however after looking over the code I found several spots where the tables were being accessed as just standard pointers without any protections. This change fixes that so that all of the proper protections are in place when accessing the table to take RCU replacement or removal of the table into account. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04fib_trie: move leaf and tnode to occupy the same spot in the key vectorAlexander Duyck1-24/+27
If we are going to compact the leaf and tnode we first need to make sure the fields are all in the same place. In that regard I am moving the leaf pointer which represents the fib_alias hash list to occupy what is currently the first key_vector pointer. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04fib_trie: Update insert and delete to make use of tp from find_nodeAlexander Duyck1-142/+95
This change makes it so that the insert and delete functions make use of the tnode pointer returned in the fib_find_node call. By doing this we will not have to rely on the parent pointer in the leaf which will be going away soon. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04fib_trie: Fib find node should return parentAlexander Duyck1-18/+24
This change makes it so that the parent pointer is returned by reference in fib_find_node. By doing this I can use it to find the parent node when I am performing an insertion and I don't have to look for it again in fib_insert_node. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04fib_trie: Fib walk rcu should take a tnode and key instead of a trie and a leafAlexander Duyck1-96/+120
This change makes it so that leaf_walk_rcu takes a tnode and a key instead of the trie and a leaf. The main idea behind this is to avoid using the leaf parent pointer as that can have additional overhead in the future as I am trying to reduce the size of a leaf down to 16 bytes on 64b systems and 12b on 32b systems. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04fib_trie: Only resize tnodes once instead of on each leaf removal in fib_table_flushAlexander Duyck1-63/+78
This change makes it so that we only call resize on the tnodes, instead of from each of the leaves. By doing this we can significantly reduce the amount of time spent resizing as we can update all of the leaves in the tnode first before we make any determinations about resizing. As a result we can simply free the tnode in the case that all of the leaves from a given tnode are flushed instead of resizing with each leaf removed. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04mpls: rtm_mpls_policy[] can be staticWu Fengguang1-1/+1
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04be2net: implement .sriov_configure() PCI callbackVasundhara Volam2-65/+107
This patch implements the .sriov_configure() PCI method to allow for runtime enabling/disabling of VFs. The module param "num_vfs" is now deprecated. At the time of driver load the PF-pool resources are allocated to the PF. When the user enables VFs, the resources are then re-distributed across PFs and VFs based on the number of VFs enabled. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04be2net: re-distribute SRIOV resources allowed by FWVasundhara Volam4-38/+141
When SR-IOV is enabled in the adapter, the FW distributes resources evenly across the PF and it's VFs. This is currently done only for some resources. This patch adds support for a new cmd that queries the FW for the list of resources for which the distribution is allowed and distributes them accordingly. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04be2net: avoid creating the non-RSS default RXQ if FW allows toVasundhara Volam5-24/+41
On BE2, BE3 and Skhawk-R chips one non-RSS (called "default") RXQ was needed to receive non-IP traffic. Some FW versions now export a capability called IFACE_FLAGS_DEFQ_RSS where this requirement doesn't hold. On such FWs the driver now does not create the non-RSS default queue. This prevents wasting one RXQ per VF. Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04net: cadence: Remove Kconfig dependency on ARCHMichal Simek1-2/+2
Remove Kconfig dependency and enable driver for all ARCHs. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04sh_eth: Mitigate lost statistics updatesBen Hutchings1-12/+25
The statistics registers have write-clear behaviour, which means we will lose any increment between the read and write. Mitigate this by only clearing when we read a non-zero value, so we will never falsely report a total of zero. This also saves time as we only handle error statistics here and they won't often be incremented. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-04sh_eth: Optionally log RX and TX status for each completed descriptorBen Hutchings1-0/+7
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>