aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-03-13gro: Defer clearing of flush bit in tunnel pathsAlexander Duyck4-11/+5
This patch updates the GRO handlers for GRE, VXLAN, GENEVE, and FOU so that we do not clear the flush bit until after we have called the next level GRO handler. Previously this was being cleared before parsing through the list of frames, however this resulted in several paths where either the bit needed to be reset but wasn't as in the case of FOU, or cases where it was being set as in GENEVE. By just deferring the clearing of the bit until after the next level protocol has been parsed we can avoid any unnecessary bit twiddling and avoid bugs. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-12rocker: move ageing_time from struct rocker to struct ofdpaJiri Pirko3-7/+7
This is OF-DPA specific, used only there, similar to ofdpa_port->ageing_time. So move it to OF-DPA code. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11Merge branch 'qed-mf-updates'David S. Miller4-100/+219
Yuval Mintz says: ==================== qed: Management firmware updates This series contains several changes to driver interaction with the management fw. The biggest [& most significant] change here is a change in the locking scheme and re-definition of the 'critical section' when accessing shared resources toward the goal of interacting with the management firmware. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11qed: Enlrage the drain timeoutYuval Mintz1-2/+2
In the scenario where slowpath configuration isn't passing due to various pause configurations affecting the chip, the theoretical time required in worst-case-scenario to empty hw fifos sufficiently to guarantee that slowpath configuration would flow is currently insufficient. This increases such a drain request to the theoretical maximum. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11qed: Notify of transciever changesZvi Nachmani2-0/+41
Handle a new message from the MFW, one that indicate that the transciever state has changed, and log that into the system logs. Signed-off-by: Zvi Nachmani <Zvi.Nachmani@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11qed: Major changes to MB lockingTomer Tayar2-97/+167
Driver interaction with the managemnt firmware is done via mailbox commands which the management firmware periodically sample, as well as placing of additional data in set places in the shared memory. Each PF has a single designated mailbox address, and all flows that require messaging to the management should use it. This patch does 2 things: 1. It re-defines the critical section surrounding the mailbox sending - that section should include the setting of the shared memory as well as the sending of the command [otherwise a race might send a command with the data of a different command]. 2. It moves the locking scheme from using mutices into using spinlocks. This lays the groundwork for sending MFW commands from non-sleepable contexts. Signed-off-by: Tomer Tayar <Tomer.Tayar@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11qed: Prevent MF link notificationsSudarsana Reddy Kalluru2-1/+9
When device is configured for Multi-function mode, some older management firmware might incorrectly notify interfaces of link changes while they haven't requested the physical link configuration to be set. This can create bizzare race conditions where unloading interfaces are getting notified that the link is up. Let the driver compensate - store the logical requested state of the link and don't propagate notifications after protocol driver explicitly requires the link to be unset. Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11Merge branch 'bpf-flow-labels'David S. Miller11-22/+76
Daniel Borkmann says: ==================== BPF support for flow labels This set adds support for tunnel key flow labels for vxlan and geneve devices in collect meta data mode and eBPF support for managing these. For details please see individual patches. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11bpf: support flow label for bpf_skb_{set, get}_tunnel_keyDaniel Borkmann2-2/+13
This patch extends bpf_tunnel_key with a tunnel_label member, that maps to ip_tunnel_key's label so underlying backends like vxlan and geneve can propagate the label to udp_tunnel6_xmit_skb(), where it's being set in the IPv6 header. It allows for having 20 more bits to encode/decode flow related meta information programmatically. Tested with vxlan and geneve. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11geneve: support setting IPv6 flow labelDaniel Borkmann2-8/+28
This work adds support for setting the IPv6 flow label for geneve per device and through collect metadata (ip_tunnel_key) frontends. Also here, the geneve dst cache does not need any special considerations, for the cases where caches can be used, the label is static per cache. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11vxlan: support setting IPv6 flow labelDaniel Borkmann3-5/+23
This work adds support for setting the IPv6 flow label for vxlan per device and through collect metadata (ip_tunnel_key) frontends. The vxlan dst cache does not need any special considerations here, for the cases where caches can be used, the label is static per cache. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11ip_tunnel: add support for setting flow label via collect metadataDaniel Borkmann7-10/+15
This patch extends udp_tunnel6_xmit_skb() to pass in the IPv6 flow label from call sites. Currently, there's no such option and it's always set to zero when writing ip6_flow_hdr(). Add a label member to ip_tunnel_key, so that flow-based tunnels via collect metadata frontends can make use of it. vxlan and geneve will be converted to add flow label support separately. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11cisco: enic: Update logging macros and usesJoe Perches6-37/+43
Don't hide varibles used by the logging macros. Miscellanea: o Use the more common ##__VA_ARGS__ extension o Add missing newlines to formats o Realign arguments Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11Merge branch 'bridge_ageing_time'David S. Miller7-10/+24
Stephen Hemminger says: ==================== bridge: ageing timer regression fix This fixes regression in how ageing timer is managed. Backing out the change required fixing switch drivers as well. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11bridge: allow zero ageing timeStephen Hemminger2-7/+8
This fixes a regression in the bridge ageing time caused by: commit c62987bbd8a1 ("bridge: push bridge setting ageing_time down to switchdev") There are users of Linux bridge which use the feature that if ageing time is set to 0 it causes entries to never expire. See: https://www.linuxfoundation.org/collaborate/workgroups/networking/bridge For a pure software bridge, it is unnecessary for the code to have arbitrary restrictions on what values are allowable. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11rocker: set FDB cleanup timer according to lowest ageing timeIdo Schimmel3-1/+7
In rocker, ageing time is a per-port attribute, so the next time the FDB cleanup timer fires should be set according to the lowest ageing time. This will later allow us to delete the BR_MIN_AGEING_TIME macro, which was added to guarantee minimum ageing time in the bridge layer, thereby breaking existing behavior. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11mlxsw: spectrum: Check requested ageing time is validIdo Schimmel2-2/+9
Commit c62987bbd8a1 ("bridge: push bridge setting ageing_time down to switchdev") added a check for minimum and maximum ageing time, but this breaks existing behaviour where one can set ageing time to 0 for a non-learning bridge. Push this check down to the driver and allow the check in the bridge layer to be removed. Currently ageing time 0 is refused by the driver, but we can later add support for this functionality. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11macvtap: always pass ethernet header in linearWillem de Bruijn1-3/+6
The stack expects link layer headers in the skb linear section. Macvtap can create skbs with llheader in frags in edge cases: when (IFF_VNET_HDR is off or vnet_hdr.hdr_len < ETH_HLEN) and prepad + len > PAGE_SIZE and vnet_hdr.flags has no or bad csum. Add checks to ensure linear is always at least ETH_HLEN. At this point, len is already ensured to be >= ETH_HLEN. For backwards compatiblity, rounds up short vnet_hdr.hdr_len. This differs from tap and packet, which return an error. Fixes b9fb9ee07e67 ("macvtap: add GSO/csum offload support") Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-11net/flower: Fix pointer castAmir Vadai2-7/+7
Cast pointer to unsigned long instead of u64, to fix compilation warning on 32 bit arch, spotted by 0day build. Fixes: 5b33f48 ("net/flower: Introduce hardware offload support") Signed-off-by: Amir Vadai <amir@vadai.me> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10Merge branch 'flower-offload'David S. Miller18-47/+698
Amir Vadai says: ==================== cls_flower hardware offload support Please see changes from V2 at the bottom. This patchset introduces cls_flower hardware offload support over ConnectX-4 driver, more hardware vendors are welcome to use it too. This patchset is based on John's infrastructure for tc offloading [2] to add hardware offload support to the flower filter. It also extends the support to an additional tc action - skbedit mark operation. NIC driver that was used is ConnectX-4. Feature is off by default and could be turned on using ethtool. Some commands to use this code: export TC=../iproute2/tc/tc export ETH=ens9 ethtool -K ens9 hw-tc-offload on $TC qdisc add dev $ETH ingress $TC filter add dev $ETH protocol ip prio 20 parent ffff: \ flower ip_proto 1 \ dst_mac 7c:fe:90:69:81:62 \ src_mac 7c:fe:90:69:81:56 \ dst_ip 11.11.11.11 \ src_ip 11.11.11.12 \ indev $ETH \ action drop $TC filter add dev $ETH protocol ip prio 30 parent ffff: \ flower ip_proto 6 \ indev $ETH \ action skbedit mark 0x1234 $TC filter add dev $ETH protocol ip prio 10 parent ffff: \ handle 0x1234 fw action pass The code was tested and applied on top of commit 3ebeac1 ("Merge branch 'cxgb4-next'") Changes from V2: - patch 1/10 ("net/flower: Introduce hardware offload support") - Remove unused variable [Dave] - Don't fail command when HW can't offload filter [John] - patch 3/10 ("net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef") - Mention in changelog that struct tc_action is now exposed out of the ifdef. - patch 4/10 ("net/act_skbedit: Utility functions for mark action") - Document clearly that is_tcf_skbedit_mark() is returning true if and only if the only action is mark [Dave] - patch 8/10 ("net/mlx5e: Introduce tc offload support") - make mlx5e_tc_add_flow() static Changes from V1: - patch 3/10 ("net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef") - fixed return value of tc_no_actions Changes from V0: - Use tc_no_actions and tc_for_each_action instead of ifdef CONFIG_NET_CLS_ACT - Replace ENOTSUPP (and some EINVAL) with EOPNOTSUPP - Name the flower command enum - fl_hw_destroy_filter() to return void - nobody uses the return value - mlx5e_tc_init() and mlx5e_tc_cleanup() to be called from the right places. - When adding HW rule fails - fail the command - Rules are added to be processed both by HW and SW unless SKIP_HW is given - Adding patch 6/10 ("net/mlx5e: Relax ndo_setup_tc handle restriction") Main changes from the RFC [1]: - API - Using ndo_setup_tc() instead of switchdev - act_skbedit, act_gact - Actions are not serialized to NIC driver, instead using access functions. - cls_flower - prevent double classification by software by not adding successfuly offloaded filters to the hashtable - Fixed some bugs in original RFC with rule delete - mlx5 - Adding flow table to kernel namespace instead of a new namespace - s/offload/tc/ in many places - no need for a special kconfig since switchdev is not used ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net/mlx5e: Support offload cls_flower with skbedit mark actionAmir Vadai3-0/+6
Introduce offloading of skbedit mark action. For example, to mark with 0x1234, all TCP (ip_proto 6) packets arriving to interface ens9: # tc qdisc add dev ens9 ingress # tc filter add dev ens9 protocol ip parent ffff: \ flower ip_proto 6 \ indev ens9 \ action skbedit mark 0x1234 Signed-off-by: Amir Vadai <amir@vadai.me> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net/mlx5e: Support offload cls_flower with drop actionAmir Vadai3-0/+309
Parse tc_cls_flower_offload into device specific commands and program the hardware to classify and act accordingly. For example, to drop ICMP (ip_proto 1) packets from specific smac, dmac, src_ip, src_ip, arriving to interface ens9: # tc qdisc add dev ens9 ingress # tc filter add dev ens9 protocol ip parent ffff: \ flower ip_proto 1 \ dst_mac 7c:fe:90:69:81:62 src_mac 7c:fe:90:69:81:56 \ dst_ip 11.11.11.11 src_ip 11.11.11.12 indev ens9 \ action drop Signed-off-by: Amir Vadai <amir@vadai.me> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net/mlx5e: Introduce tc offload supportAmir Vadai5-2/+222
Extend ndo_setup_tc() to support ingress tc offloading. Will be used by later patches to offload tc flower filter. Feature is off by default and could be enabled by issuing: # ethtool -K eth0 hw-tc-offload on Offloads flow table is dynamically created when first filter is added. Rules are saved in a hash table that is maintained by the consumer (for example - the flower offload in the next patch). When last filter is removed and no filters exist in the hash table, the offload flow table is destroyed. Signed-off-by: Amir Vadai <amir@vadai.me> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net/mlx5e: Add a new priority for kernel flow tablesAmir Vadai2-4/+4
Move the vlan and main flow tables to use priority 1. This will allow the upcoming TC offload logic to use a higher priority (0) for the offload steering table. Signed-off-by: Amir Vadai <amir@vadai.me> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net/mlx5e: Relax ndo_setup_tc handle restrictionAmir Vadai1-1/+1
Restricting handle to TC_H_ROOT breaks the old instantiation of mqprio to setup a hardware qdisc. This patch relaxes the test, to only check the type. Fixes: 08fb1da ("net/mlx5e: Support DCBNL IEEE ETS") Signed-off-by: Amir Vadai <amir@vadai.me> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net/mlx5_core: Set flow steering dest only for forward rulesAmir Vadai2-19/+28
We need to handle flow table entry destinations only if the action associated with the rule is forwarding (MLX5_FLOW_CONTEXT_ACTION_FWD_DEST). Fixes: 26a8145390b3 ('net/mlx5_core: Introduce flow steering firmware commands') Signed-off-by: Amir Vadai <amir@vadai.me> Signed-off-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net/act_skbedit: Utility functions for mark actionAmir Vadai1-0/+16
Enable device drivers to query the action, if and only if is a mark action and what value to use for marking. Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Amir Vadai <amir@vadai.me> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdefAmir Vadai2-7/+18
Introduce the macros tc_no_actions and tc_for_each_action to make code clearer. Extracted struct tc_action out of the ifdef to make calls to is_tcf_gact_shot() and similar functions valid, even when it is a nop. Acked-by: Jiri Pirko <jiri@mellanox.com> Acked-by: John Fastabend <john.r.fastabend@intel.com> Suggested-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Amir Vadai <amir@vadai.me> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net/flow_dissector: Make dissector_uses_key() and skb_flow_dissector_target() publicAmir Vadai2-13/+13
Will be used in a following patch to query if a key is being used, and what it's value in the target object. Acked-by: John Fastabend <john.r.fastabend@intel.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Amir Vadai <amir@vadai.me> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net/flower: Introduce hardware offload supportAmir Vadai4-1/+81
This patch is based on a patch made by John Fastabend. It adds support for offloading cls_flower. when NETIF_F_HW_TC is on: flags = 0 => Rule will be processed twice - by hardware, and if still relevant, by software. flags = SKIP_HW => Rull will be processed by software only If hardware fail/not capabale to apply the rule, operation will NOT fail. Filter will be processed by SW only. Acked-by: Jiri Pirko <jiri@mellanox.com> Suggested-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: Amir Vadai <amir@vadai.me> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10Merge branch 'mediatek-eth'David S. Miller8-0/+2336
John Crispin says: ==================== net-next: mediatek: add ethernet driver This series adds support for the Mediatek ethernet core found on current ARM based SoCs. The driver works on MT2701 and MT7623 SoCs Instead of trying to upstream everything at once I decided to concentrate on the important parts required to make current generation silicon work. The V3 series only includes the code required to make dual MAC setups work and only supports the newer QDMA engine. Changes in V5 * reduce the mdio timeut to HZ * add a call to usleep_range() which schedules in the background. Changes in V4 * remove ugly _FE macro, use offsetof() instead Changes in V3 * only include code for MT2701/7623 support * drop support for PDMA and older MIPS based SoCs * drop switch support Changes in V2 * change the namespace of the functions from fe_* to mtk_* * add support for the latest generation of ARM SoCs * add dual MAC support * remove the swconfig specific bits * remove most of the magic values and replace them with defines * add verbose descriptions to the patches ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net-next: mediatek: add an entry to MAINTAINERSJohn Crispin1-0/+7
Add myself and Felix as the Maintainers for the MediaTek ethernet driver. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net-next: mediatek: add Kconfig and MakefileJohn Crispin4-0/+24
This patch adds the Makefile and Kconfig required to make the driver build. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net-next: mediatek: add support for MT7623 ethernetJohn Crispin2-0/+2228
Add ethernet support for MediaTek SoCs from the MT7623 family. These have dual GMAC. Depending on the exact version, there might be a built-in Gigabit switch (MT7530). The core does not have the typical DMA ring setup. Instead there is a linked list that we add descriptors to. There is only one linked list that both MACs use together. There is a special field inside the TX descriptors called the VQID. This allows us to assign packets to different internal queues. By using a separate id for each MAC we are able to get deterministic results for BQL. Additionally we need to provide the core with a block of scratch memory that is the same size as the RX ring and data buffer. This is really needed to make the HW datapath work. Although the driver does not support this yet, we still need to assign the memory and tell the core about it for RX to work. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Michael Lee <igvtee@gmail.com> Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net-next: mediatek: document MediaTek SoC ethernet bindingJohn Crispin1-0/+77
This adds the binding documentation for the MediaTek Ethernet controller. Signed-off-by: John Crispin <blogic@openwrt.org> Acked-by: Rob Herring <robh@kernel.org> Cc: devicetree@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net: dsa: Fix cleanup resources upon module removalNeil Armstrong1-8/+8
The initial commit badly merged into the dsa_resume method instead of the dsa_remove_dst method. As consequence, the dst->master_netdev->dsa_ptr is not set to NULL on removal and re-bind of the dsa device fails with error -17. Fixes: b0dc635d923c ("net: dsa: cleanup resources upon module removal ") Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Acked-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10qede: Fix net-next "make ARCH=x86_64"Manish Chopra1-1/+4
'commit 55482edc25f0606851de42e73618f813f310d009 ("qede: Add slowpath/fastpath support and enable hardware GRO")' introduces below error when compiling net-next with "make ARCH=x86_64" drivers/built-in.o: In function `qede_rx_int': qede_main.c:(.text+0x6101a0): undefined reference to `tcp_gro_complete' Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10Merge branch 'qlcnic-next'David S. Miller3-11/+19
Rajesh Borundia says: ==================== qlcnic fixes This series adds following fixes. o While processing mailbox if driver gets a spurious mailbox interrupt it leads into premature completion of a next mailbox request. Added a guard against this by checking current state of mailbox and ignored spurious interrupt. Added a stats counter to record this condition. v2: o Added patch that removes usage of atomic_t as we are not implemeting atomicity by using atomic_t value. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10qlcnic: Fix mailbox completion handling during spurious interruptRajesh Borundia3-5/+14
o While the driver is in the middle of a MB completion processing and it receives a spurious MB interrupt, it is mistaken as a good MB completion interrupt leading to premature completion of the next MB request. Fix the driver to guard against this by checking the current state of MB processing and ignore the spurious interrupt. Also added a stats counter to record this condition. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10qlcnic: Remove unnecessary usage of atomic_tRajesh Borundia2-6/+5
o atomic_t usage is incorrect as we are not implementing any atomicity. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10Merge branch 'cxgb4-next'David S. Miller1-96/+125
Hariprasad Shenai says: ==================== cxgb4vf: Interrupt and queue configuration changes This series fixes some issues and some changes in the queue and interrupt configuration for cxgb4vf driver. We need to enable interrupts before we register our network device, so that we don't loose link up interrupts. Allocate rx queues based on interrupt type. Set number of tx/rx queues in probe function only. Also adds check for some invalid configurations. This patch series has been created against net-next tree and includes patches on cxgb4vf driver. We have included all the maintainers of respective drivers. Kindly review the change and let us know in case of any review comments. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10cxgb4vf: Set number of queues in pci probe onlyHariprasad Shenai1-4/+4
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10cxgb4vf: Add a couple more checks for invalid provisioning configurationsHariprasad Shenai1-0/+5
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10cxgb4vf: Configure queue based on resource and interrupt typeHariprasad Shenai1-71/+94
The Queue Set Configuration code was always reserving room for a Forwarded interrupt Queue even in the cases where we weren't using it. Figure out how many Ports and Queue Sets we can support. This depends on knowing our Virtual Function Resources and may be called a second time if we fall back from MSI-X to MSI Interrupt Mode. This change fixes that problem. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10cxgb4vf: Enable interrupts before we register our network devicesHariprasad Shenai1-25/+26
This avoids a race condition where a system that has network devices set up to be automatically configured and we get the first Port Link Status message from the firmware on the Asynchronous Firmware Event Queue before we've enabled interrupts. If that happens, we end up losing the interrupt and never realizing that the links has actually come up. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net: dsa: mv88e6xxx: avoid writing the same modeVivien Didelot1-8/+13
There is no need to change the 802.1Q port mode for the same value. Thus avoid such message: [ 401.954836] dsa dsa@0 lan0: 802.1Q Mode: Disabled (was Disabled) Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Tested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net: dsa: mv88e6xxx: read then write PVIDVivien Didelot1-4/+26
The port register 0x07 contains more options than just the default VID, even though they are not used yet. So prefer a read then write operation over a direct write. This also allows to keep track of the change through dynamic debug. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Tested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10net: dsa: mv88e6xxx: rework port state setterVivien Didelot2-22/+34
Apply a few non-functional changes on the port state setter: * add a dynamic debug message with state names to track changes * explicit states checking instead of assuming their numeric values * lock mutex only once when changing several port states * use bitmap macros to declare and access port_state_update_mask Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Tested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10Merge branch 'sh_eth-fixes'David S. Miller1-4/+6
Sergei Shtylyov says: ==================== sh_eth: fix couple of bugs in sh_eth_ring_format() Here's a set of 2 patches against DaveM's 'net.git' repo fixing two bugs in sh_eth_.ring_format()... [1/2] sh_eth: fix NULL pointer dereference in sh_eth_ring_format() [2/2] sh_eth: advance 'rxdesc' later in sh_eth_ring_format() ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-10sh_eth: advance 'rxdesc' later in sh_eth_ring_format()Sergei Shtylyov1-3/+4
Iff dma_map_single() fails, 'rxdesc' should point to the last filled RX descriptor, so that it can be marked as the last one, however the driver would have already advanced it by that time. In order to fix that, only fill an RX descriptor once all the data for it is ready. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>