summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Bluetooth: Move LE debugfs file creation into hci_debugfs.cMarcel Holtmann2014-12-202-478/+474Star
| | | | | | | | | | | | | | | | This patch moves the creation of the debugs files for LE controllers into hci_debugfs.c file. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Move BR/EDR debugfs file creation into hci_debugfs.cMarcel Holtmann2014-12-202-349/+350
| | | | | | | | | | | | | | | | This patch moves the creation of the debugs files for BR/EDR controllers into hci_debugfs.c file. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Move common debugfs file creation into hci_debugfs.cMarcel Holtmann2014-12-202-201/+200Star
| | | | | | | | | | | | | | | | This patch moves the creation of the debugs files common for all controllers into hci_debugfs.c file. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Add skeleton functions for debugfs creationMarcel Holtmann2014-12-204-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The debugfs file creation has been part of the core initialization handling of controllers. With the introduction of Bluetooth 4.2 core specification, the number of debugfs files is increasing even further. To avoid cluttering the core controller handling, create a separate file hci_debugfs.c to centralize all debugfs file creation. For now leave the current files in the core, but in the future all debugfs file creation will be moved. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * Bluetooth: Support static address when BR/EDR has been disabledMarcel Holtmann2014-12-202-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every BR/EDR/LE dual-mode controller requires to have a public address and so far that has become the identity address and own address. The only way to change that behavior was with a force_static_address debugfs option. However the host can actually disable the BR/EDR part of a dual-mode controller and turn into a single mode LE controller. In that case it makes perfect sense for a host to use a chosen static address instead of the public address. So if the host disables BR/EDR and configures a static address, then that static address is used as identity address and own address. If the host does not configure a static address, then the public address is used as before. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * ieee802154: iface: move multiple node type checkAlexander Aring2014-12-201-14/+9Star
| | | | | | | | | | | | | | | | This patch moves the handling for checking on multiple node type interface to the corresponding concurrent iface check function. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * mac802154: iface: check concurrent ifacesAlexander Aring2014-12-201-0/+77
| | | | | | | | | | | | | | | | | | | | This patch adds a check for concurrent interfaces while calling interface up. This avoids to have different mac parameters on one phy. Otherwise it could be that a interface can overwrite current phy mac settings which is set by an another interface. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Move hci_update_page_scan to hci_request.cJohan Hedberg2014-12-192-56/+56
| | | | | | | | | | | | | | | | | | This is a left-over from the patch that created hci_request.c. The hci_update_page_scan functions should have been moved from hci_core.c there. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Add return parameter to cmd_complete callbacksJohan Hedberg2014-12-191-40/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | The cmd_complete callbacks for pending mgmt commands may fail e.g. in the case of memory allocation. Previously this error would be caught and returned to user space in the form of a failed write on the mgmt socket (when the error happened in the mgmt command handler) but with the introduction of the generic cmd_complete callback this information was lost. This patch returns the feature by making cmd_complete callbacks return int instead of void. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix Add Device to wait for HCI before sending cmd_completeJohan Hedberg2014-12-193-70/+109
| | | | | | | | | | | | | | | | | | | | | | | | This patch updates the Add Device mgmt command handler to use a hci_request to wait for HCI command completion before notifying user space of the mgmt command completion. To do this we need to add an extra hci_request parameter to the hci_conn_params_set function. Since this function has no other users besides mgmt.c it's moved there as a static function. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix Remove Device to wait for HCI before sending cmd_completeJohan Hedberg2014-12-191-22/+62
| | | | | | | | | | | | | | | | | | | | | | This patch updates the Remove Device mgmt command handler to use a hci_request to wait for HCI command completion before notifying user space of the mgmt command completion. This way we ensure that once the mgmt command returns all HCI commands triggered by it have also completed. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Add hci_request support for hci_update_background_scanJohan Hedberg2014-12-195-97/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | Many places using hci_update_background_scan() try to synchronize whatever they're doing with the help of hci_request callbacks. However, since the hci_update_background_scan() function hasn't so far accepted a hci_request pointer any commands triggered by it have been left out by the synchronization. This patch modifies the API in a similar way as was done for hci_update_page_scan, i.e. there's a variant that takes a hci_request and another one that takes a hci_dev. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Split hci_request helpers to hci_request.[ch]Johan Hedberg2014-12-198-395/+453
| | | | | | | | | | | | | | | | | | | | None of the hci_request related things in net/bluetooth/hci_core.h are needed anywhere outside of the core bluetooth module. This patch creates a new net/bluetooth/hci_request.c file with its corresponding h-file and moves the functionality there from hci_core.c and hci_core.h. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Split hci_update_page_scan into two functionsJohan Hedberg2014-12-194-16/+24
| | | | | | | | | | | | | | | | | | | | | | To keep the parameter list and its semantics clear it makes sense to split the hci_update_page_scan function into two separate functions: one taking a hci_dev and another taking a hci_request. The one taking a hci_dev constructs its own hci_request and then calls the other function. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: cleanup check on trac statusAlexander Aring2014-12-191-5/+3Star
| | | | | | | | | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: 6lowpan: Add IPSP PSM valueJukka Rissanen2014-12-191-0/+1
| | | | | | | | | | | | | | | | The Internet Protocol Support Profile a.k.a BT 6LoWPAN specification is ready so PSM value for it is now known. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: remove version check for AT86RF212Andrey Yurovsky2014-12-191-10/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This version check allows the driver to only work with v=1 hardware however there is no driver-facing difference with newer versions (confirmed by Atmel FAEs) so this check needlessly prevents the driver from being used with radios now in production. Tested on AT86RF212B radio (which came up as v=3). Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: fix register read for part versionAndrey Yurovsky2014-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The driver was reading the PART_NUM register for both the part number (type of device) and the part version, the version is actually in register 0x1D, VERSION_NUM. I believe that this was a copy-paste error. Tested on AT86RF212B where the part is detected to be the expected part number (0x07) and version (0x03 on mine). Signed-off-by: Andrey Yurovsky <andrey@snupi.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: remove unnecessary assignAlexander Aring2014-12-191-1/+0Star
| | | | | | | | | | | | | | | | The attribute extra_tx_headroom should already be zero. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: fix context pointer handlingAlexander Aring2014-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | This patch changes the context pointer to the parameter given one inside function at86rf230_async_state_change_start. This could occur problem if context isn't pointed to lp->state. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: make at86rf230_async_error inlineAlexander Aring2014-12-191-1/+1
| | | | | | | | | | | | | | | | | | This patch makes the at86rf230_async_error inline. This function is small enough to handle inline. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: remove if branchAlexander Aring2014-12-191-4/+1Star
| | | | | | | | | | | | | | | | | | This patch removes an unnecessary if branch inside the tx complete handler. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reviewed-by: Stefan Schmidt <s.schmidt@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * ieee802154/mrf24j40: Fix alignment of parenthesisStefan Schmidt2014-12-191-2/+2
| | | | | | | | | | | | | | CC: Alan Ott <alan@signal11.us> Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * ieee802154/mrf24j40: Fix typo begining -> beginningStefan Schmidt2014-12-191-1/+1
| | | | | | | | | | | | | | CC: Alan Ott <alan@signal11.us> Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * ieee802154/cc2520: Remove extra blank linesStefan Schmidt2014-12-191-2/+0Star
| | | | | | | | | | | | | | CC: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * ieee802154/at86rf230: Fix typo unkown -> unknownStefan Schmidt2014-12-191-1/+1
| | | | | | | | | | | | Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * ieee802154/at86rf230: Align to opening parenthesisStefan Schmidt2014-12-191-4/+4
| | | | | | | | | | | | Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * ieee802154/at86rf230: Remove unneeded blank linesStefan Schmidt2014-12-191-2/+0Star
| | | | | | | | | | | | Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Acked-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * at86rf230: add reset state cca handlingAlexander Aring2014-12-191-0/+2
| | | | | | | | | | | | | | | | This patch adds the default cca setting after device reset for at86rf230 driver. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * nl802154: introduce support for cca settingsAlexander Aring2014-12-195-4/+75
| | | | | | | | | | | | | | This patch adds support for setting cca parameters via nl802154. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * ieee802154: rework cca settingAlexander Aring2014-12-199-14/+51
| | | | | | | | | | | | | | | | | | | | The current cca setting handle is a driver specific call. We need to introduce some 802.15.4 specific layer and mapping 802.15.4 cca modes to driver specific ones inside the 802.15.4 driver. This patch will add such 802.15.4 layer and mapping the cca settings to driver specific ones. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * nl802154: introduce cca mode enumsAlexander Aring2014-12-191-0/+43
| | | | | | | | | | | | | | This patch adds enums for 802.15.4 specific CCA settings. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: btusb: support public address configuration for ath3012Toshi Kikuchi2014-12-181-0/+28
| | | | | | | | | | | | | | | | | | Set hdev->set_bdaddr handler for ath3012. It sends the vendor specific HCI command to change the public address. The change doesn't persist across power cycle. Signed-off-by: Toshi Kikuchi <toshik@chromium.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | geneve: Add Geneve GRO supportJoe Stringer2015-01-021-2/+95
| | | | | | | | | | | | | | | | | | This results in an approximately 30% increase in throughput when handling encapsulated bulk traffic. Signed-off-by: Joe Stringer <joestringer@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: Add Transparent Ethernet Bridging GRO support.Jesse Gross2015-01-023-47/+102
| | | | | | | | | | | | | | | | | | Currently the only tunnel protocol that supports GRO with encapsulated Ethernet is VXLAN. This pulls out the Ethernet code into a proper layer so that it can be used by other tunnel protocols such as GRE and Geneve. Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net/fsl: remove hardcoded clock setting from xgmac_mdioShaohui Xie2015-01-021-14/+0Star
| | | | | | | | | | | | | | | | | | | | There is no need to set the clock speed in read/write which will be performed unnecessarily for each mdio access. Init it during probe is enough. Also, the hardcoded clock value is not a proper way for all SoCs. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net/fsl: remove irq assignment from xgmac_mdioShaohui Xie2015-01-021-2/+1Star
| | | | | | | | | | | | | | | | Which is wrong and not used, so no extra space needed by mdiobus_alloc_size(), use mdiobus_alloc() instead. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net/fsl: remove reset from xgmac_mdioShaohui Xie2015-01-021-19/+0Star
| | | | | | | | | | | | | | | | Since the reset is just clock setting, individual mdio reset is not available. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'gmac-next'David S. Miller2015-01-0110-8/+633
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Roger Chen says: ==================== support GMAC driver for RK3288 Roger Chen (6): patch1: add driver for Rockchip RK3288 SoCs integrated GMAC patch2: define clock ID used for GMAC patch3: modify CRU config for Rockchip RK3288 SoCs integrated GMAC patch4: dts: rockchip: add gmac info for rk3288 patch5: dts: rockchip: enable gmac on RK3288 evb board patch6: add document for Rockchip RK3288 GMAC Tested on rk3288 evb board: Execute the following command to enable ethernet, set local IP and ping a remote host. busybox ifconfig eth0 up busybox ifconfig eth0 192.168.1.111 ping 192.168.1.1 ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | GMAC: add document for Rockchip RK3288 GMACRoger Chen2015-01-011-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The document descripts how to add properties for GMAC in device tree. change since v2: 1. remove power-gpio, reset-gpio, phyirq-gpio, pmu_regulator setting 2. add "snps,reset-gpio", "snps,reset-active-low;" "snps,reset-delays-us" Signed-off-by: Roger Chen <roger.chen@rock-chips.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ARM: dts: rockchip: enable gmac on RK3288 evb boardRoger Chen2015-01-012-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enable gmac in rk3288-evb-rk808.dts changes since v2: 1. add fixed regulator for PHY 2. remove power-gpio, reset-gpio, phyirq-gpio, pmu_regulator setting 3. add "snps,reset-gpio", "snps,reset-active-low;" "snps,reset-delays-us" Signed-off-by: Roger Chen <roger.chen@rock-chips.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ARM: dts: rockchip: add gmac info for rk3288Roger Chen2015-01-011-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add gmac info in rk3288.dtsi for GMAC driver changes since v2: 1. add drive-strength in the pinctrl settings Signed-off-by: Roger Chen <roger.chen@rock-chips.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | GMAC: modify CRU config for Rockchip RK3288 SoCs integrated GMACRoger Chen2015-01-011-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modify CRU config for GMAC driver changes since v2: 1. remove SCLK_MAC_PLL Signed-off-by: Roger Chen <roger.chen@rock-chips.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | GMAC: define clock ID used for GMACRoger Chen2015-01-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | changes since v2: 1. remove SCLK_MAC_PLL Signed-off-by: Roger Chen <roger.chen@rock-chips.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | GMAC: add driver for Rockchip RK3288 SoCs integrated GMACRoger Chen2015-01-014-1/+462
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver is based on stmmac driver. changes since v2: - use tab instead of space for macros - use HIWORD_UPDATE macro for GMAC_CLK_RX_DL_CFG and GMAC_CLK_TX_DL_CFG - remove drive-strength setting in the driver and set it in the pinctrl settings - use dev_err instead of pr_err - remove clock names's macros, just use the real name of the clock - use devm_clk_get() instead of clk_get() - remove clk_set_parent(bsp_priv->clk_mac, bsp_priv->clk_mac_pll) - remove gpio setting for LDO, just use regulator API - remove phy reset using gpio in the glue layer, it has been handled in the stmmac driver - remove handling phy interrupt (mii interrupt) changes since v1: - use BIT() to set register - combine two remap_write() operations into one for the same register - use macros for register value setting - remove grf fail check in rk_gmac_setup() and save all the check in set_rgmii_speed() - remove .tx_coe=1 in rk_gmac_data Signed-off-by: Roger Chen <roger.chen@rock-chips.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | igb_ptp: Include clocksource.h to get CLOCKSOURCE_MASK.David S. Miller2015-01-011-0/+1
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | e1000e: Include clocksource.h to get CLOCKSOURCE_MASK.David S. Miller2015-01-011-0/+1
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'fib_trie-next'David S. Miller2015-01-014-1071/+946Star
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alexander Duyck says: ==================== fib_trie: Reduce time spent in fib_table_lookup by 35 to 75% These patches are meant to address several performance issues I have seen in the fib_trie implementation, and fib_table_lookup specifically. With these changes in place I have seen a reduction of up to 35 to 75% for the total time spent in fib_table_lookup depending on the type of search being performed. On a VM running in my Corei7-4930K system with a trie of maximum depth of 7 this resulted in a reduction of over 370ns per packet in the total time to process packets received from an ixgbe interface and route them to a dummy interface. This represents a failed lookup in the local trie followed by a successful search in the main trie. Baseline Refactor ixgbe->dummy routing 1.20Mpps 2.21Mpps ------------------------------------------------------------ processing time per packet 835ns 453ns fib_table_lookup 50.1% 418ns 25.0% 113ns check_leaf.isra.9 7.9% 66ns -- -- ixgbe_clean_rx_irq 5.3% 44ns 9.8% 44ns ip_route_input_noref 2.9% 25ns 4.6% 21ns pvclock_clocksource_read 2.6% 21ns 4.6% 21ns ip_rcv 2.6% 22ns 4.0% 18ns In the simple case of receiving a frame and dropping it before it can reach the socket layer I saw a reduction of 40ns per packet. This represents a trip through the local trie with the correct leaf found with no need for any backtracing. Baseline Refactor ixgbe->local receive 2.65Mpps 2.96Mpps ------------------------------------------------------------ processing time per packet 377ns 337ns fib_table_lookup 25.1% 95ns 25.8% 87ns ixgbe_clean_rx_irq 8.7% 33ns 9.0% 30ns check_leaf.isra.9 7.2% 27ns -- -- ip_rcv 5.7% 21ns 6.5% 22ns These changes have resulted in several functions being inlined such as check_leaf and fib_find_node, but due to the code simplification the overall size of the code has been reduced. text data bss dec hex filename 16932 376 16 17324 43ac net/ipv4/fib_trie.o - before 15259 376 8 15643 3d1b net/ipv4/fib_trie.o - after Changes since RFC: Replaced this_cpu_ptr with correct call to this_cpu_inc in patch 1 Changed test for leaf_info mismatch to (key ^ n->key) & li->mask_plen in patch 10 ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | fib_trie: Add tracking value for suffix lengthAlexander Duyck2015-01-011-6/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a tracking value for the maximum suffix length of all prefixes stored in any given tnode. With this value we can determine if we need to backtrace or not based on if the suffix is greater than the pos value. By doing this we can reduce the CPU overhead for lookups in the local table as many of the prefixes there are 32b long and have a suffix length of 0 meaning we can immediately backtrace to the root node without needing to test any of the nodes between it and where we ended up. Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | fib_trie: Remove checks for index >= tnode_child_length from tnode_get_childAlexander Duyck2015-01-011-9/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some reason the compiler doesn't seem to understand that when we are in a loop that runs from tnode_child_length - 1 to 0 we don't expect the value of tn->bits to change. As such every call to tnode_get_child was rerunning tnode_chile_length which ended up consuming quite a bit of space in the resultant assembly code. I have gone though and verified that in all cases where tnode_get_child is used we are either winding though a fixed loop from tnode_child_length - 1 to 0, or are in a fastpath case where we are verifying the value by either checking for any remaining bits after shifting index by bits and testing for leaf, or by using tnode_child_length. size net/ipv4/fib_trie.o Before: text data bss dec hex filename 15506 376 8 15890 3e12 net/ipv4/fib_trie.o After: text data bss dec hex filename 14827 376 8 15211 3b6b net/ipv4/fib_trie.o Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>