summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* netfilter: nfnetlink_queue: rename related to nfqueue attaching conntrack infoKen-ichirou MATSUZAWA2015-10-054-49/+49
| | | | | | | | | The idea of this series of patch is to attach conntrack information to nflog like nfqueue has already done. nfqueue conntrack info attaching basis is generic, rename those names to generic one, glue. Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: remove dead codeFlavio Leitner2015-10-051-4/+0
| | | | | | | | Remove __nf_conntrack_find() from headers. Fixes: dcd93ed4cd1 ("netfilter: nf_conntrack: remove dead code") Signed-off-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: nfnetlink_queue: use y2038 safe timestampPablo Neira Ayuso2015-10-051-3/+4
| | | | | | | | | | | | | | The __build_packet_message function fills a nfulnl_msg_packet_timestamp structure that uses 64-bit seconds and is therefore y2038 safe, but it uses an intermediate 'struct timespec' which is not. This trivially changes the code to use 'struct timespec64' instead, to correct the result on 32-bit architectures. This is a copy and paste of Arnd's original patch for nfnetlink_log. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* Merge tag 'ipvs3-for-v4.4' of ↵Pablo Neira Ayuso2015-10-051-2/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next Simon Horman says: ==================== Third Round of IPVS Updates for v4.4 please consider this build fix from Eric Biederman which resolves a build problem introduced in is excellent work to cleanup IPVS which you recently pulled: its queued up for v4.4 so no need to worry about earlier kernel versions. I have another minor cleanup, to fix a build warning, pending. However, I wanted to send this one to you now as its hit nf-next, net-next and in turn next, and a slow trickle of bug reports are appearing. ==================== Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * ipvs: Don't protect ip_vs_addr_is_unicast with CONFIG_SYSCTLEric W. Biederman2015-10-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I arranged the code so that the compiler can remove the unecessary bits in ip_vs_leave when CONFIG_SYSCTL is unset, and removed an explicit CONFIG_SYSCTL. Unfortunately when rebasing my work on top of that of Alex Gartrell I missed the fact that the newly added function ip_vs_addr_is_unicast was surrounded by CONFIG_SYSCTL. So remove the now unnecessary CONFIG_SYSCTL guards around ip_vs_addr_is_unicast. It is causing build failures today when CONFIG_SYSCTL is not selected and any self respecting compiler will notice that sysctl_cache_bypass is always false without CONFIG_SYSCTL and not include the logic from the function ip_vs_addr_is_unicast in the compiled code. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
* | netfilter: rename nfnetlink_queue_core.c to nfnetlink_queue.cPablo Neira Ayuso2015-10-042-1/+0
| | | | | | | | | | | | | | Now that we have integrated the ct glue code into nfnetlink_queue without introducing dependencies with the conntrack code. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* | netfilter: nfnetlink_queue: get rid of nfnetlink_queue_ct.cPablo Neira Ayuso2015-10-047-187/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original intention was to avoid dependencies between nfnetlink_queue and conntrack without ifdef pollution. However, we can achieve this by moving the conntrack dependent code into ctnetlink and keep some glue code to access the nfq_ct indirection from nfqueue. After this patch, the nfq_ct indirection is always compiled in the netfilter core to avoid polluting nfqueue with ifdefs. Thus, if nf_conntrack is not compiled this results in only 8-bytes of memory waste in x86_64. This patch also adds ctnetlink_nfqueue_seqadj() to avoid that the nf_conn structure layout if exposed to nf_queue, which creates another dependency with nf_conntrack at compilation time. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* | tcp/dccp: add SLAB_DESTROY_BY_RCU flag for request socketsEric Dumazet2015-10-032-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before letting request sockets being put in TCP/DCCP regular ehash table, we need to add either : - SLAB_DESTROY_BY_RCU flag to their kmem_cache - add RCU grace period before freeing them. Since we carefully respected the SLAB_DESTROY_BY_RCU protocol like ESTABLISH and TIMEWAIT sockets, use it here. req_prot_init() being only used by TCP and DCCP, I did not add a new slab_flags into their rsk_prot, but reuse prot->slab_flags Since all reqsk_alloc() users are correctly dealing with a failure, add the __GFP_NOWARN flag to avoid traces under pressure. Fixes: 079096f103fa ("tcp/dccp: install syn_recv requests into ehash table") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵David S. Miller2015-10-0316-63/+87
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2015-09-30 This series contains updates to i40e and i40evf only. Vasily Averin provides a couple of rtnl lock/unlock fixes for both i40e and i40evf. Shannon provides several updates and fixes, first fixes up a type clash in i40e_aq_rc_to_posix(), where the error codes are signed values, so we need to treat them as such. Then fixes up a padding issue where an extra byte is added in i40e_aqc_get_cee_dcb_cfg_v1_resp to directly acknowledge the padding. Updated i40e to keep debugfs register read and writes from accessing outside of the io-remapped space. Added support and device id for another 20 GbE device. Jesse fixes the transmit hand workaround code for ARM that was causing Tx hangs to still occur occasionally when there really was no hang. Then fixed the receive dropped counter to show up in netstat interface. Refactor the interrupt enable function since it was always making the caller add the base_vector from the VSI struct which is already passed to the function. Fix kbuild warnings found in 0day build infrastructure by adding a harmless cast to a dev_info(), also fix 32 bit build warnings found by sparse. Greg fixed a configuration error that results if a port VLAN is set for a VF before the VF driver is loaded, so that when the VF driver is loaded the port VLAN is ignored. Mitch fixes the use of QOS field consistently in i40e_ndo_set_vf_port_vlan(). Modified the init timing of the driver to increase stability on load/unload and SR-IOV enable/disable cycles. Anjali updates i40e to not collect VEB stats if they are disabled in the hardware for performance reasons. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | i40e: fix 32 bit build warningsJesse Brandeburg2015-09-302-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sparse found some issues with 32 bit compilation, which probably should at least work without warning. Not only that, but the code was wrong. Thanks sparse!! And thanks to the kbuild robot zero day testing for finding this issue. $ make ARCH=i386 M=drivers/net/ethernet/intel/i40e C=2 CF="-D__CHECK_ENDIAN__" CHECK drivers/net/ethernet/intel/i40e/i40e_main.c include/linux/etherdevice.h:79:32: warning: restricted __be16 degrades to integer drivers/net/ethernet/intel/i40e/i40e_main.c:7565:17: warning: shift too big (32) for type unsigned long drivers/net/ethernet/intel/i40e/i40e_main.c:7565:17: warning: shift too big (42) for type unsigned long drivers/net/ethernet/intel/i40e/i40e_main.c:7565:17: warning: shift too big (39) for type unsigned long drivers/net/ethernet/intel/i40e/i40e_main.c:7565:17: warning: shift too big (40) for type unsigned long CC: kbuild-all@01.org Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: fix kbuild warningsJesse Brandeburg2015-09-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 0day build infrastructure found some issues in i40e, this removes the warnings by adding a harmless cast to a dev_info. CC: kbuild-all@01.org Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40evf: tweak init timingMitch Williams2015-09-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch tweaks the init timing of the driver just a little bit to increase stability on load/unload and SR-IOV enable/disable cycles. First, run the init_task loop a little quicker in order to reduce overall init time. Second, stagger the start of the init task based on the device's PCIe function ID. This lessens the impact on the firmware when a whole bunch of VFs are initialized simultaneously, e.g. enabling SR-IOV without the VF driver blacklisted. For single VFs assigned to VMs this will have no effect as the function ID will always be 0. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: warn on double freeJesse Brandeburg2015-09-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Down was requesting queue disables, but then exited immediately without waiting for the queues to actually disable. This could allow any function called after i40evf_down to run immediately, including i40evf_up, and causes a memory leak. This issue has been fixed in a recent refactor of the reset code, but add a couple WARN_ONs in the slow path to help us recognize if we reintroduce this issue or if we missed any cases. Change-ID: I27b6b5c9a79c1892f0ba453129f116bc32647dd0 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: refactor interrupt enableJesse Brandeburg2015-09-302-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interrupt enable function was always making the caller add the base_vector from the VSI struct which is already passed to the function. Just collapse the math into the helper function. Change-ID: I54ef33aa7ceebc3231c3cc48f7b39fd0c3ff5806 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: Strip VEB stats if they are disabled in HWAnjali Singhai Jain2015-09-303-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to performance reasons, VEB stats have been disabled in the hw. This patch adds code to check for that condition before accumulating these stats. Change-ID: I7d805669476fedabb073790403703798ae5d878e Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e/i40evf: add new device id 1588Shannon Nelson2015-09-306-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add new device id and support for another 20Gb device. Change-ID: Ib1b61e5bb6201d84953f97cade39a6e3369c2cf2 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: Remove useless messageGreg Rose2015-09-301-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove a useless message that blathers on whenever a vxlan port is deleted. Change-ID: If63fb8cf38e56cf433b68e498f11389de51919ba Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: limit debugfs io opsShannon Nelson2015-09-303-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't let the debugfs register read and write commands try to access outside of the ioremapped space. While we're at it, remove the use of a misleading constant. Change-ID: Ifce2893e232c65c7a76c23532c658f298218a81b Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: use QOS field consistentlyMitch Williams2015-09-301-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In i40e_ndo_set_vf_port_vlan, we were using the QOS value inconsistently, sometimes shifting it, sometimes not. Do the shift-and- or operation correctly, once, and use the result consistently everywhere in the function. Change-ID: I46f062f3edc90a8a017ecec9137f4d1ab0ab9e41 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: count drops in netstat interfaceJesse Brandeburg2015-09-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i40e rx_dropped counter was not showing up in netstat -i. Add the right counter to be updated with the stats. Change-ID: I4dd552e9995836099184f9d9a08e90edb591155f Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e/i40evf: fix Tx hang workaround codeJesse Brandeburg2015-09-302-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The arm writeback (arm_wb) code is used for kicking the Tx ring to make sure any pending work is completed even if interrupts are disabled. It was running when it didn't need to, and not clearing the ring->arm_wb state after it was set. This caused Tx hangs to still occur occasionally when there really was no hang. Fix this by resetting the variable right after it was used. Change-ID: I7bf75d552ba9c4bd203d40615213861a24bb5594 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: fixup padding issue in get_cee_dcb_cfg_v1_respShannon Nelson2015-09-301-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The struct i40e_aqc_get_cee_dcb_cfg_v1_resp was originally defined with word boundary layout issues, which most compilers deal with by silently adding padding, making the actual struct larger than designed. This patch adds an extra byte in fields reserved3 and reserved4 to directly acknowledge that padding. Because the struct doesn't actually change in size or layout, this doesn't constitute a change in the API. Change-ID: I53fa4741b73fa255621232a85fba000b0e223015 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: Fix a port VLAN configuration bugGreg Rose2015-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a port VLAN is set for a given virtual function (VF) before the VF driver is loaded then a configuration error results in which the port VLAN is ignored when the VF driver is subsequently loaded. This causes the VF's MAC/VLAN filters to not use the correct VLAN filter. This patch ensures that the port VLAN filter is considered at the right time during configuration of the VF's MAC/VLAN filters. Change-ID: I28f404cbc21a4c6d70a7980b87c77f13f06685a4 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e/i40evf: fix up type clash in i40e_aq_rc_to_posix conversionShannon Nelson2015-09-302-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error code sent into i40e_aq_rc_to_posix() are signed values, so we really need to treat them as such. Change-ID: I3d1ae0ee9ae0b1b6f5fc424f8b8cc58b0ea93203 Reported-by: Helin Zhang <helin.zhang@intel.com> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: rtnl_lock called twice in i40e_pci_error_resume()Vasily Averin2015-09-301-1/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40evf: missing rtnl_unlock in i40evf_resume()Vasily Averin2015-09-301-0/+1
| |/ | | | | | | | | | | Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Tested-by: Andrews Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | Merge branch 'ravb-r8a7795'David S. Miller2015-10-035-53/+184
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simon Horman says: ==================== ravb: Add support for r8a7795 SoC please consider this series for net-next. It enhances the ravb driver to support the r8a7795 SoC. Changes: * Dropped RFC prefix * Details in changelog of individual patches Base: * net-next/master Availability: To aid review of this in conjunction with other EtherAVB changes the following branches are available in my renesas tree on kernel.org. * me/r8a7795-ravb-driver-v4: this series * me/r8a7795-ravb-pfc-v2: r8a7795 sh-pfc update for EthernetAVB * me/r8a7795-ravb-integration-v4: enable EthernetAVB on r8a7795 * me/r8a7795-ravb-driver-and-integration-v4.runtime: the above three branches with their runtime dependencies ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ravb: Add support for r8a7795 SoCKazuya Mizuguchi2015-10-032-8/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch supports the r8a7795 SoC by: - Using two interrupts + One for E-MAC + One for everything else + Both can be handled by the existing common interrupt handler, which affords a simpler update to support the new SoC. In future some consideration may be given to implementing multiple interrupt handlers - Limiting the phy speed to 100Mbit/s for the new SoC; at this time it is not clear how this restriction may be lifted but I hope it will be possible as more information comes to light Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com> [horms: reworked] Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ravb: Document binding for r8a7795 SoCKazuya Mizuguchi2015-10-031-7/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates the ravb binding to support the r8a7795 SoC by: - Adding a compat string for the new hardware - Adding 25 named interrupts to binding for the new SoC; older SoCs continue to use a single multiplexed interrupt The example is also updated to reflect the r8a7795 as this is the more complex case. Based on work by Kazuya Mizuguchi and others. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ravb: Provide dev parameter to DMA APIKazuya Mizuguchi2015-10-031-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is in preparation for using this driver on arm64 where the implementation of __dma_alloc_coherent fails if a device parameter is not provided. Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Masaru Nagai <masaru.nagai.vx@renesas.com> [horms: squashed into a single patch] Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | phylib: Add phy_set_max_speed helperSimon Horman2015-10-032-19/+41
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a helper to allow ethernet drivers to limit the speed of a phy (that they are attached to). This mainly involves factoring out the business-end of of_set_phy_supported() and exporting a new symbol. This code seems to be open coded in several places, in several different variants. It is is envisaged that this will be used in situations where setting the "max-speed" property in DT is not appropriate, e.g. because the maximum speed is not a property of the phy hardware. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'bpf-updates'David S. Miller2015-10-0313-16/+63
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Daniel Borkmann says: ==================== BPF updates Some minor updates to {cls,act}_bpf to retrieve routing realms and to make skb->priority writable. Thanks! v1 -> v2: - Dropped preclassify patch for now from the series as the rest is pretty much independent of it - Rest unchanged, only rebased and already posted Acked-by's kept ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | sched, bpf: make skb->priority writableDaniel Borkmann2015-10-031-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | {cls,act}_bpf can now set the skb->priority from an eBPF program based on various critera, so that for example classful qdiscs like multiq can update the skb's priority during enqueue time and further push it down into subsequent qdiscs. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | sched, bpf: add helper for retrieving routing realmsDaniel Borkmann2015-10-035-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using routing realms as part of the classifier is quite useful, it can be viewed as a tag for one or multiple routing entries (think of an analogy to net_cls cgroup for processes), set by user space routing daemons or via iproute2 as an indicator for traffic classifiers and later on processed in the eBPF program. Unlike actions, the classifier can inspect device flags and enable netif_keep_dst() if necessary. tc actions don't have that possibility, but in case people know what they are doing, it can be used from there as well (e.g. via devs that must keep dsts by design anyway). If a realm is set, the handler returns the non-zero realm. User space can set the full 32bit realm for the dst. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ebpf: migrate bpf_prog's flags to bitfieldDaniel Borkmann2015-10-0311-12/+18
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | As we need to add further flags to the bpf_prog structure, lets migrate both bools to a bitfield representation. The size of the base structure (excluding insns) remains unchanged at 40 bytes. Add also tags for the kmemchecker, so that it doesn't throw false positives. Even in case gcc would generate suboptimal code, it's not being accessed in performance critical paths. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'switchdev-obj'David S. Miller2015-10-0311-160/+199
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jiri Pirko says: ==================== switchdev: bring back switchdev_obj Second version of the patch extends to a patchset. Basically this patchset brings object structure back which disappeared with recent Vivien's patchset. Also it does a bit of naming changes in order to get the things in line. Also, object id is put back into object structure. Thanks to Scott and Vivien for review and suggestions. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | switchdev: push object ID back to object structureJiri Pirko2015-10-036-56/+45
| | | | | | | | | | | | | | | | | | | | | | | | Suggested-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | switchdev: bring back switchdev_obj and use it as a generic object paramJiri Pirko2015-10-036-62/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace "void *obj" with a generic structure. Introduce couple of helpers along that. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | switchdev: rename switchdev_obj_fdb to switchdev_obj_port_fdbJiri Pirko2015-10-035-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the struct name in sync with object id name. Suggested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | switchdev: rename switchdev_obj_vlan to switchdev_obj_port_vlanJiri Pirko2015-10-035-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the struct name in sync with object id name. Suggested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | switchdev: rename SWITCHDEV_ATTR_* enum values to SWITCHDEV_ATTR_ID_*Jiri Pirko2015-10-039-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | To be aligned with obj. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | switchdev: rename SWITCHDEV_OBJ_* enum values to SWITCHDEV_OBJ_ID_*Jiri Pirko2015-10-037-35/+37
|/ / | | | | | | | | | | | | | | Suggested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Scott Feldman <sfeldma@gmail.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'tcp-lockless-listener'David S. Miller2015-10-0320-746/+307
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eric Dumazet says: ==================== tcp/dccp: lockless listener TCP listener refactoring : this is becoming interesting ! This patch series takes the steps to use normal TCP/DCCP ehash table to store SYN_RECV requests, instead of the private per-listener hash table we had until now. SYNACK skb are now attached to their syn_recv request socket, so that we no longer heavily modify listener sk_wmem_alloc. listener lock is no longer held in fast path, including SYNCOOKIE mode. During my tests, my server was able to process 3,500,000 SYN packets per second on one listener and still had available cpu cycles. That is about 2 to 3 order of magnitude what we had with older kernels. This effort started two years ago and I am pleased to reach expectations. We'll probably extend SO_REUSEPORT to add proper cpu/numa affinities, so that heavy duty TCP servers can get proper siloing thanks to multi-queues NIC. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp: do not lock listener to process SYN packetsEric Dumazet2015-10-032-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Everything should now be ready to finally allow SYN packets processing without holding listener lock. Tested: 3.5 Mpps SYNFLOOD. Plenty of cpu cycles available. Next bottleneck is the refcount taken on listener, that could be avoided if we remove SLAB_DESTROY_BY_RCU strict semantic for listeners, and use regular RCU. 13.18% [kernel] [k] __inet_lookup_listener 9.61% [kernel] [k] tcp_conn_request 8.16% [kernel] [k] sha_transform 5.30% [kernel] [k] inet_reqsk_alloc 4.22% [kernel] [k] sock_put 3.74% [kernel] [k] tcp_make_synack 2.88% [kernel] [k] ipt_do_table 2.56% [kernel] [k] memcpy_erms 2.53% [kernel] [k] sock_wfree 2.40% [kernel] [k] tcp_v4_rcv 2.08% [kernel] [k] fib_table_lookup 1.84% [kernel] [k] tcp_openreq_init_rwin Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp/dccp: add a reschedule point in inet_csk_listen_stop()Eric Dumazet2015-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | If a listener with thousands of children in accept queue is dismantled, it can take a while to close all of them. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp: remove max_qlen_logEric Dumazet2015-10-034-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This control variable was set at first listen(fd, backlog) call, but not updated if application tried to increase or decrease backlog. It made sense at the time listener had a non resizeable hash table. Also rounding to powers of two was not very friendly. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp/dccp: remove struct listen_sockEric Dumazet2015-10-033-76/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is enough to check listener sk_state, no need for an extra condition. max_qlen_log can be moved into struct request_sock_queue We can remove syn_wait_lock and the alignment it enforced. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp: attach SYNACK messages to request sockets instead of listenerEric Dumazet2015-10-038-32/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a listen backlog is very big (to avoid syncookies), then the listener sk->sk_wmem_alloc is the main source of false sharing, as we need to touch it twice per SYNACK re-transmit and TX completion. (One SYN packet takes listener lock once, but up to 6 SYNACK are generated) By attaching the skb to the request socket, we remove this source of contention. Tested: listen(fd, 10485760); // single listener (no SO_REUSEPORT) 16 RX/TX queue NIC Sustain a SYNFLOOD attack of ~320,000 SYN per second, Sending ~1,400,000 SYNACK per second. Perf profiles now show listener spinlock being next bottleneck. 20.29% [kernel] [k] queued_spin_lock_slowpath 10.06% [kernel] [k] __inet_lookup_established 5.12% [kernel] [k] reqsk_timer_handler 3.22% [kernel] [k] get_next_timer_interrupt 3.00% [kernel] [k] tcp_make_synack 2.77% [kernel] [k] ipt_do_table 2.70% [kernel] [k] run_timer_softirq 2.50% [kernel] [k] ip_finish_output 2.04% [kernel] [k] cascade Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ipv6: remove obsolete inet6 functionsEric Dumazet2015-10-031-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | inet6_csk_search_req() and inet6_csk_reqsk_queue_hash_add() no longer exist. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp/dccp: shrink struct listen_sockEric Dumazet2015-10-032-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We no longer use hash_rnd, nr_table_entries and syn_table[] For a listener with a backlog of 10 millions sockets, this saves 80 MBytes of vmalloced memory. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud