summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* netfilter: nft_rbtree: introduce lockingPablo Neira Ayuso2014-06-021-1/+21
| | | | | | | | There's no rbtree rcu version yet, so let's fall back on the spinlock to protect the concurrent access of this structure both from user (to update the set content) and kernel-space (in the packet path). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: nf_tables: release objects in reverse order in the abort pathPablo Neira Ayuso2014-06-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | The patch c7c32e7 ("netfilter: nf_tables: defer all object release via rcu") indicates that we always release deleted objects in the reverse order, but that is only needed in the abort path. These are the two possible scenarios when releasing objects: 1) Deletion scenario in the commit path: no need to release objects in the reverse order since userspace already ensures that dependencies are fulfilled), ie. userspace tells us to delete rule -> ... -> rule -> chain -> table. In this case, we have to release the objects in the *same order* as userspace provided. 2) Deletion scenario in the abort path: we have to iterate in the reverse order to undo what it cannot be added, ie. userspace sent us a batch that includes: table -> chain -> rule -> ... -> rule, and that needs to be partially undone. In this case, we have to release objects in the reverse order to ensure that the set and chain objects point to valid rule and table objects. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: nf_tables: fix wrong transaction ordering in set elementsPablo Neira Ayuso2014-06-021-2/+2
| | | | | | | | | | | | The transaction needs to be placed at the end of the commit list, otherwise event notifications are reordered and we may crash when releasing object via call_rcu. This problem was introduced in 60319eb ("netfilter: nf_tables: use new transaction infrastructure to handle elements"). Reported-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* netfilter: nfnetlink_acct: Fix memory leakMathieu Poirier2014-06-021-1/+0
| | | | | | | | | | Allocation of memory need only to happen once, that is after the proper checks on the NFACCT_FLAGS have been done. Otherwise the code can return without freeing already allocated memory. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* Revert "net/mlx4_en: Use affinity hint"David S. Miller2014-06-026-50/+4
| | | | | | This reverts commit 70a640d0dae3a9b1b222ce673eb5d92c263ddd61. Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ks8851: Don't use regulator_get_optional()Stephen Boyd2014-06-021-28/+22
| | | | | | | | | | | | | | | | | We shouldn't be using regulator_get_optional() here. These regulators are always present as part of the physical design and there isn't any way to use an internal regulator or change the source of the reference voltage via software. Given that the only users of this driver in the kernel are DT based, this change should be transparent to them even if they don't specify any supplies because the regulator framework will insert dummy supplies as needed. Cc: Nishanth Menon <nm@ti.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'filter-next'David S. Miller2014-06-019-824/+871
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Daniel Borkmann says: ==================== BPF + test suite updates These are the last bigger BPF changes that I had in my todo queue for now. As the first two patches from this series contain additional test cases for the test suite, I have rebased them on top of current net-next with the set from [1] applied to avoid introducing any unnecessary merge conflicts. For details, please refer to the individual patches. Test suite runs fine with the set applied. [1] http://patchwork.ozlabs.org/patch/352599/ http://patchwork.ozlabs.org/patch/352600/ ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: filter: improve filter block macrosDaniel Borkmann2014-06-012-174/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 9739eef13c92 ("net: filter: make BPF conversion more readable") started to introduce helper macros similar to BPF_STMT()/BPF_JUMP() macros from classic BPF. However, quite some statements in the filter conversion functions remained in the old style which gives a mixture of block macros and non block macros in the code. This patch makes the block macros itself more readable by using explicit member initialization, and converts the remaining ones where possible to remain in a more consistent state. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: filter: get rid of BPF_S_* enumDaniel Borkmann2014-06-018-649/+498
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch finally allows us to get rid of the BPF_S_* enum. Currently, the code performs unnecessary encode and decode workarounds in seccomp and filter migration itself when a filter is being attached in order to overcome BPF_S_* encoding which is not used anymore by the new interpreter resp. JIT compilers. Keeping it around would mean that also in future we would need to extend and maintain this enum and related encoders/decoders. We can get rid of all that and save us these operations during filter attaching. Naturally, also JIT compilers need to be updated by this. Before JIT conversion is being done, each compiler checks if A is being loaded at startup to obtain information if it needs to emit instructions to clear A first. Since BPF extensions are a subset of BPF_LD | BPF_{W,H,B} | BPF_ABS variants, case statements for extensions can be removed at that point. To ease and minimalize code changes in the classic JITs, we have introduced bpf_anc_helper(). Tested with test_bpf on x86_64 (JIT, int), s390x (JIT, int), arm (JIT, int), i368 (int), ppc64 (JIT, int); for sparc we unfortunately didn't have access, but changes are analogous to the rest. Joint work with Alexei Starovoitov. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Mircea Gherzan <mgherzan@gmail.com> Cc: Kees Cook <keescook@chromium.org> Acked-by: Chema Gonzalez <chemag@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: filter: add test for loading SKF_AD_OFF limitsDaniel Borkmann2014-06-011-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | This check tests that overloading BPF_LD | BPF_ABS with an always invalid BPF extension, that is SKF_AD_MAX, fails to make sure classic BPF behaviour is correct in filter checker. Also, we add a test for loading at packet offset SKF_AD_OFF-1 which should pass the filter, but later on fail during runtime. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: filter: add slot overlapping test with fully filled M[]Daniel Borkmann2014-06-011-1/+74
|/ | | | | | | | | | | | | Also add a test for the scratch memory store that first fills all slots and then sucessively reads all of them back adding up to A, and eventually returning A. This and the previous M[] test with alternating fill/spill will detect possible JIT errors on M[]. Suggested-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bridge: fix the unbalanced promiscuous count when add_if failedwangweidong2014-06-011-1/+1
| | | | | | | | | | | | | As commit 2796d0c648c94 ("bridge: Automatically manage port promiscuous mode."), make the add_if use dev_set_allmulti instead of dev_set_promiscuous, so when add_if failed, we should do dev_set_allmulti(dev, -1). Signed-off-by: Wang Weidong <wangweidong1@huawei.com> Reviewed-by: Amos Kong <akong@redhat.com> Acked-by: Vlad Yasevich <vyasevic@redhat.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Revert mlx4 cpumask changes.David S. Miller2014-06-013-88/+28
| | | | | | | | | | | This reverts commit 70a640d0dae3a9b1b222ce673eb5d92c263ddd61 ("net/mlx4_en: Use affinity hint") and commit c8865b64b05b2f4eeefd369373e9c8aeb069e7a1 ("cpumask: Utility function to set n'th cpu - local cpu first") because these changes break the build when SMP is disabled amongst other things. Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ks8851: Don't use regulator_get_optional()Stephen Boyd2014-06-011-28/+22
| | | | | | | | | | | | | | | | | We shouldn't be using regulator_get_optional() here. These regulators are always present as part of the physical design and there isn't any way to use an internal regulator or change the source of the reference voltage via software. Given that the only users of this driver in the kernel are DT based, this change should be transparent to them even if they don't specify any supplies because the regulator framework will insert dummy supplies as needed. Cc: Nishanth Menon <nm@ti.com> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'mlx4-next'David S. Miller2014-06-018-4/+116
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amir Vadai says: ==================== cpumask,net: Affinity hint helper function This patchset will set affinity hint to influence IRQs to be allocated on the same NUMA node as the one where the card resides. As discussed in http://www.spinics.net/lists/netdev/msg271497.html If the number of IRQs allocated is greater than the number of local NUMA cores, all local cores will be used first, and the rest of the IRQs will be on a remote NUMA node. If no NUMA support - IRQ's and cores will be mapped 1:1 Since the utility function to calculate the mapping could be useful in other mq drivers in the kernel, it was added to cpumask.[ch] This patchset was tested and applied on top of net-next since the first consumer is a network device (mlx4_en). Over commit 506724c: "tg3: Override clock, link aware and link idle mode during NVRAM dump" I couldn't find a maintainer for cpumask.c, so only added the kernel mailing list Amir Changes from V5: - Moved the utility function from kernel/irq/manage.c to lib/cpumask.c, and renamed it's name accordingly to cpumask_set_cpu_local_first() - Added some comments as Thomas Gleixner suggested - Changed -EINVAL to -EAGAIN, that describes the error situtation better. Changes from V4: - Patch 1/2: irq: Utility function to get affinity_hint by policy Thank you Ben for the great review: - Moved the function it kernel/irq/manage.c since it could be useful for block mq devices - Fixed Typo's - Use cpumask_t * instead of cpumask_var_t in function header - Restructured the function to remove NULL assignment in a cpumask_var_t - Fix for offline local CPU's Changes from V3: - Patch 2/2: net/mlx4_en: Use affinity hint - somehow patch file was corrupted Changes from V2: - Patch 1/2: net: Utility function to get affinity_hint by policy - Fixed style issues Changes from V1: - Patch 1/2: net: Utility function to get affinity_hint by policy - Fixed error flow to return -EINVAL on error (thanks govind) - Patch 2/2: net/mlx4_en: Use affinity hint - Set ring->affinity_hint to NULL on error Changes from V0: - Fixed small style issues ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx4_en: Use affinity hintYuval Atias2014-06-016-4/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The “affinity hint” mechanism is used by the user space daemon, irqbalancer, to indicate a preferred CPU mask for irqs. Irqbalancer can use this hint to balance the irqs between the cpus indicated by the mask. We wish the HCA to preferentially map the IRQs it uses to numa cores close to it. To accomplish this, we use cpumask_set_cpu_local_first(), that sets the affinity hint according the following policy: First it maps IRQs to “close” numa cores. If these are exhausted, the remaining IRQs are mapped to “far” numa cores. Signed-off-by: Yuval Atias <yuvala@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * cpumask: Utility function to set n'th cpu - local cpu firstAmir Vadai2014-06-012-0/+66
|/ | | | | | | | | | | | | | | | | | | | | This function sets the n'th cpu - local cpu's first. For example: in a 16 cores server with even cpu's local, will get the following values: cpumask_set_cpu_local_first(0, numa, cpumask) => cpu 0 is set cpumask_set_cpu_local_first(1, numa, cpumask) => cpu 2 is set ... cpumask_set_cpu_local_first(7, numa, cpumask) => cpu 14 is set cpumask_set_cpu_local_first(8, numa, cpumask) => cpu 1 is set cpumask_set_cpu_local_first(9, numa, cpumask) => cpu 3 is set ... cpumask_set_cpu_local_first(15, numa, cpumask) => cpu 15 is set Curently this function will be used by multi queue networking devices to calculate the irq affinity mask, such that as many local cpu's as possible will be utilized to handle the mq device irq's. Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-nextDavid S. Miller2014-05-3012-51/+138
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next This small patchset contains three accumulated Netfilter/IPVS updates, they are: 1) Refactorize common NAT code by encapsulating it into a helper function, similarly to what we do in other conntrack extensions, from Florian Westphal. 2) A minor format string mismatch fix for IPVS, from Masanari Iida. 3) Add quota support to the netfilter accounting infrastructure, now you can add quotas to accounting objects via the nfnetlink interface and use them from iptables. You can also listen to quota notifications from userspace. This enhancement from Mathieu Poirier. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * netfilter: add helper for adding nat extensionFlorian Westphal2014-04-296-48/+30
| | | | | | | | | | | | | | Reduce copy-past a bit by adding a common helper. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * netfilter: nfnetlink_acct: Adding quota support to accounting frameworkMathieu Poirier2014-04-295-2/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nfacct objects already support accounting at the byte and packet level. As such it is a natural extension to add the possiblity to define a ceiling limit for both metrics. All the support for quotas itself is added to nfnetlink acctounting framework to stay coherent with current accounting object management. Quota limit checks are implemented in xt_nfacct filter where statistic collection is already done. Pablo Neira Ayuso has also contributed to this feature. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
| * netfilter: Fix format string mismatch in ip_vs_proto_name()Masanari Iida2014-04-231-1/+1
| | | | | | | | | | | | | | | | Fix string mismatch in ip_vs_proto_name() Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* | Merge branch 'master' of ↵David S. Miller2014-05-3016-100/+116
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates This series contains updates to i40e and i40evf. Kevin updates the i40e and i40evf driver i40e_check_asq_alive() to ensure the length register offset is non-zero which indicates that the software has initialized the admin queue. Also removes PCTYPE definitions which are now reserved. Mitch enables descriptor prefetch for rings belonging to the virtual function. Also configures the VF minimum transmit rate to 50 Mbps rather than 0 which was be interpreted as no limit at all. Mitch found in order for the VF to achieve its programmed transmit rate, we need to set the max credit value to 4. Lastly fixes a Tx hang and firmware crash that happens after setting the MTU on a VF by not using the RESETTING state during reinit, this is because the RESETTING state means that a catastrophic hardware bad thing is happening and the driver needs to tiptoe around and not use the admin queue or registers. A reinit is no big deal and we can use the admin queue (and we should) so do not set the state to RESETTING during reinit to resolve the bug. Akeem changes the declaration of the transmit and receive rings inside several loops to eliminate declaring the same ring every time for the duration of the loop and declares them just once before the loop. Also fixes the driver to clear the recovery pending bit if pf_reset fails instead of falling through the setup process. Anjali makes a change based on feedback from Ben Hutchings that cmd->data needs to be reported in ETHTOOL_GRXCLSRLCNT and use a helper function to calculate the total filter count. Jesse removes storm control since the storm control features are not apart of the hardware and were mistakenly left in the code. Greg changes tx_lpi_status and rx_lpi_status from bool to u32 to avoid sparse errors. Shannon adds the clear_pxe AdminQ API call to tell the firmware that the driver is taking over from PXE. In addition, relaxes the firmware API check to allow more flexibility in handling newer NICs and NVMs in the field. Vasu ensures that FCoE is disabled for MFP modes since it is not supported by overriding the hardware FCoE capability. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | i40e: relax the firmware API version checkShannon Nelson2014-05-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As long as the Firmware isn't reporting a higher API major version number than what the driver knows about, the driver does not need to worry as much about greater minor numbers. The API changes minor numbers when things get added to the API, but no existing structs or calls are changed. The driver has the option of warning that the minor numbers don't match. This will allow a little more flexibility in handling newer NICs and NVMs in the field. Change-ID: I5302acd2d147a2992328991ee7223b2ff39c8741 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40evf: don't use RESETTING state during reinitMitch Williams2014-05-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RESETTING state means that a Catastrophic Hardware Bad Thing is happening and the driver need to tiptoe around and not use the admin queue or registers or anything like that. On the other hand, a reinit is no big deal and we can use the admin queue, and we should. So don't set the state to RESETTING here. This fixes a Tx hang and FW crash that happens after setting the MTU on a VF. Change-ID: I3e6191edbd6a93958a1f1bd1d41a5c2d17474d41 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40: disable FCoE for MFP modesVasu Dev2014-05-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently FCoE is not supported with MFP modes, so this patch makes sure it is disabled. It is disabled by overriding HW FCoE capability, so that later it can be re-enabled by just the SW upgrade. Change-ID: I1c0bae5c099b209f56b88bda360031a8565e43e8 Signed-off-by: Vasu Dev <vasu.dev@intel.com> Tested-By: Jack Morgan <jack.morgan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: add clear_pxe AdminQ requestShannon Nelson2014-05-292-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the clear_pxe AdminQ API call. Change-ID: Ia770ff3404971bb3889b53a39c3a7bfaf3f4d399 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: Clear recovery pending, if reset failedAkeem G Abodunrin2014-05-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If pf_reset failed, it becomes necessary to clear recovery pending bit, instead of falling through the setup process. Change-ID: Ic1611e6a32741fe3a2782ec7be173cb65e7492ed Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e/i40evf: Change type to u32 to avoid sparse errorGreg Rose2014-05-292-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tx_lpi_status and rx_lpi_status are declared as bool but then used in sizeof operations in the CORE driver code. Make them u32 to make sparse be quiet. Change-ID: Iad6daeb1c7149e61ece242acd18c64b320c246a3 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e/i40evf: remove storm controlJesse Brandeburg2014-05-295-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The storm control features are not part of the hardware and mistakenly were left in the code. Remove them as they are not needed any more. Change-ID: I6e9277c8da2c52e69348a657bae25271449c2099 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: Use the new i40e_get_fd_cnt_all function in other placesAnjali Singhai Jain2014-05-292-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | We have a function to calculate this, so update the code to use the function. Change-ID: Ia345b6fe6ec7f0b2dcf1199471b0d0f959ad3908 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: Report cmd->data in ETHTOOL_GRXCLSRLCNT instead of ETHTOOL_GRXCLSRULEAnjali Singhai Jain2014-05-292-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on review feedback from upstream cmd->data is not defined in ETHTOOL_GRXCLSRULE but needs to be reported in ETHTOOL_GRXCLSRLCNT. Also use a helper function to calculate the total filter count. Change-ID: Iaacbf729527b73290c4fdad837b379b44fd7dd20 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e/i40evf: Remove reserved PCTYPE definesKevin Scott2014-05-296-57/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch to remove PCTYPE definitions which are now reserved. Change-ID: I66c1c16a45a16f4894b2983101ab2a48ce03f1f4 Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: Tx/Rx rings declarationAkeem G Abodunrin2014-05-292-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the declaration of Tx/Rx rings inside several loops. It eliminates declaring the same rings every time for the duration of the loop, instead declaring them once before the loop. Change-ID: I59dea54276f18c47dca522f520c18f65fe42a15d Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40evf: tweak Tx rate params and de-magic-ifyMitch Williams2014-05-291-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order for the VF to achieve its programmed Tx rate, we need to set the max credits value to 4. While we're at it, get rid of some magic numbers. Change-ID: I4f17b4d3a90f1e069bdd134a543f0aa22feac3a9 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40evf: don't round Tx rate down to 0Mitch Williams2014-05-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because the hardware configures VF Tx rates in increments of 50 Mbps, values smaller than that would be rounded down to 0, which was interpreted as no limit at all. Rather than do this, we round up to 50 Mbps and notify the user. Change-ID: I5275848233fe7514cf93e11323661c68f4c38737 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e: enable descriptor prefetch for VFsMitch Williams2014-05-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As recommended by the hardware guys, enable descriptor prefetch for rings belonging to VFs. This matches a change already made for ring belonging to the PF. Change-ID: Idcc4dc7064bc9144ea81f5701ad07b7ecd11ba49 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| * | i40e/i40evf: Update check for AQ alivenessKevin Scott2014-05-292-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the i40e_check_asq_alive check to ensure that the len register offset is non-zero, indicating that SW has initialized the AQ. Change-ID: I9c2e804788b4775bef9c7e80954ab004e6bdb306 Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* | | af_key: Replace comma with semicolonHimangi Saraogi2014-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces a comma between expression statements by a semicolon. A simplified version of the semantic patch that performs this transformation is as follows: // <smpl> @r@ expression e1,e2,e; type T; identifier i; @@ e1 -, +; e2; // </smpl> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | rds/tcp_listen: Replace comma with semicolonHimangi Saraogi2014-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces a comma between expression statements by a semicolon. A simplified version of the semantic patch that performs this transformation is as follows: // <smpl> @r@ expression e1,e2,e; type T; identifier i; @@ e1 -, +; e2; // </smpl> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | RDS/RDMA: Replace comma with semicolonHimangi Saraogi2014-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces a comma between expression statements by a semicolon. A simplified version of the semantic patch that performs this transformation is as follows: // <smpl> @r@ expression e1,e2,e; type T; identifier i; @@ e1 -, +; e2; // </smpl> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | ipmr: Replace comma with semicolonHimangi Saraogi2014-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces a comma between expression statements by a semicolon. A simplified version of the semantic patch that performs this transformation is as follows: // <smpl> @r@ expression e1,e2,e; type T; identifier i; @@ e1 -, +; e2; // </smpl> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | Merge branch 's390-next'David S. Miller2014-05-305-25/+40
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Frank Blaschka says: ==================== s390: network patches for net-next V1 here are some s390 related patches for net-next Added some style fixing reported by David Laight. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | s390/net: fix format string mismatchesUrsula Braun2014-05-303-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cppcheck blamed some issues in drivers/s390/net/... They are fixed here. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Reported-by: Toralf Foerster <toralf.foerster@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | qeth: Fix for possible null pointer dereferenceRickard Strandqvist2014-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is otherwise a risk of a possible null pointer dereference. Was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | af_iucv: correct cleanup if listen backlog is fullUrsula Braun2014-05-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of transport HIPER a sock struct is allocated for an incoming connect request. If the backlog queue is full this socket is not needed, but is left in the list of af_iucv sockets. Final socket release posts console message "Attempt to release alive iucv socket". This patch makes sure the new created socket is cleaned up correctly if the backlog queue is full. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Reported-by: Philipp Hachtmann <phacht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | af_iucv: Add automatic (source) iucv_name to bindPhilipp Hachtmann2014-05-301-11/+18
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a socket is bound to an address using before calling connect it is usual to leave it to the network system to choose an appropriate outgoing application name respective port address. af_iucv on VM uses a counter and uses simple numbers as unique identifiers. This behaviour was missing when af_iucv is used with HiperSockets. This patch contains a simple approach to harmonize af_iucv's behaviour. Signed-off-by: Philipp Hachtmann <phacht@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | Merge branch 'be2net-next'David S. Miller2014-05-305-277/+438
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sathya Perla says: ==================== be2net: patch set Patch 1 is a minor optimization for issuing multicast promisc FW cmd only when the interface is not already in that mode. Patch 2 provides support for VF TX-rate setting on Skyhawk-R. Patch 3 provides support for flashing new FW flash regions. Patches 4, 5, 6 cleanup the MCC processing (for FW cmds) code in be_cmds.c. The MCC error reporting and event handling code are areas that needed cleanup. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | be2net: cleanup MCC async event processing codeSathya Perla2014-05-302-70/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MCC async event processing code has 2 issues: a) because of long struct names the code indentation is badly broken b) description and definitions of how an MCC completion is interpreted as an async event are confusing (for e.g. the last word of an MCC event is named "code", while "code" is just a sub-field of the last word.) This patch fixes the structure definitions, comments and re-factors code as needed. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | be2net: move async cmd processing to a separate routineSathya Perla2014-05-301-33/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some FW cmds, the caller just issues the cmd and doesn't wait for a response. The response handling is done in the MCCQ compl processing context only. Move this code into a separate routine to make be_mcc_compl_process() more manageable. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | be2net: re-factor MCCQ error status handling codeKalesh AP2014-05-303-45/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch improves MCCQ error status handling in the following ways: a) A MCC cmd completion returns a base-status and an addl-status. So far, the routine be_mcc_compl_process() returned only the "status" value. Now, embedd both statuses in the return value and let the caller routine access the value of interest using base_status() and addl_status() macros. b) Rename variables accordingly (base/addl) to avoid confusion while error checking. b) Some of the errors returned by FW are harmless and so an error msg is not logged for such errors. Capture this logic in a separate routine to make the code more readable. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud