summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * net/mlx5e: Offload TC matching on ip tos / traffic-classOr Gerlitz2017-06-051-1/+25
| | | | | | | | | | | | | | Enable offloading of TC matching on ipv4 tos or ipv6 traffic-class. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/mlx5e: Offload TC matching on tcp flagsOr Gerlitz2017-06-051-1/+21
| | | | | | | | | | | | | | Enable offloading of TC matching on tcp flags. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/sched: cls_flower: add support for matching on ip tos and ttlOr Gerlitz2017-06-052-2/+42
| | | | | | | | | | | | | | | | | | | | Benefit from the support of ip header fields dissection and allow users to set rules matching on ipv4 tos and ttl or ipv6 traffic-class and hoplimit. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/flow_dissector: add support for dissection of misc ip header fieldsOr Gerlitz2017-06-052-0/+51
|/ | | | | | | | | | | Add support for dissection of ip tos and ttl and ipv6 traffic-class and hoplimit. Both are dissected into the same struct. Uses similar call to ip dissection function as with tcp, arp and others. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: remove unnecessary skb_reset_tail_pointer()Eric Dumazet2017-06-021-4/+2Star
| | | | | | | | | __pskb_trim_head() does not need to reset skb tail pointer. Also change the comments, __pskb_pull_head() does not exist. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bpf: Remove the capability check for cgroup skb eBPF programChenbo Feng2017-06-021-1/+3
| | | | | | | | | | | | | | | | Currently loading a cgroup skb eBPF program require a CAP_SYS_ADMIN capability while attaching the program to a cgroup only requires the user have CAP_NET_ADMIN privilege. We can escape the capability check when load the program just like socket filter program to make the capability requirement consistent. Change since v1: Change the code style in order to be compliant with checkpatch.pl preference Signed-off-by: Chenbo Feng <fengc@google.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* bpf: Allow CGROUP_SKB eBPF program to access sk_buffChenbo Feng2017-06-021-0/+1
| | | | | | | | | | | | | This allows cgroup eBPF program to classify packet based on their protocol or other detail information. Currently program need CAP_NET_ADMIN privilege to attach a cgroup eBPF program, and A process with CAP_NET_ADMIN can already see all packets on the system, for example, by creating an iptables rules that causes the packet to be passed to userspace via NFLOG. Signed-off-by: Chenbo Feng <fengc@google.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: phy: use of_mdio_parse_addrJon Mason2017-06-021-13/+2Star
| | | | | | | | | | | use of_mdio_parse_addr() in place of an OF read of reg and a bounds check (which is litterally the exact same thing that of_mdio_parse_addr() does) Signed-off-by: Jon Mason <jon.mason@broadcom.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: use TS opt on RTTs for congestion controlYuchung Cheng2017-06-021-7/+8
| | | | | | | | | | | | | | | | | | Currently when a data packet is retransmitted, we do not compute an RTT sample for congestion control due to Kern's check. Therefore the congestion control that uses RTT signals may not receive any update during loss recovery which could last many round trips. For example, BBR and Vegas may not be able to update its min RTT estimation if the network path has shortened until it recovers from losses. This patch mitigates that by using TCP timestamp options for RTT measurement for congestion control. Note that we already use timestamps for RTT estimation. Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* liquidio: Fix checkpatch errors with references crossing single lineSatanand Burla2017-06-023-12/+10Star
| | | | | | | Signed-off-by: Satanand Burla <satananda.burla@cavium.com> Signed-off-by: Derek Chickles <derek.chickles@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tools: hv: set hotplug for VF on Susesixiao@microsoft.com2017-06-021-1/+5
| | | | | | | | | | On HyperV, the VF interface can be offered by a host at any time. Mark the VF interface as hotplug, to make sure it will be brought up automatically when it is registered. Signed-off-by: Simon Xiao <sixiao@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tools: hv: set allow-hotplug for VF on Ubuntusixiao@microsoft.com2017-06-021-2/+4
| | | | | | | | | | On HyperV, the VF interface can be offered by a host at any time. Mark the VF interface as hotplug, to make sure it will be brought up automatically when it is registered. Signed-off-by: Simon Xiao <sixiao@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* liquidio: VF interrupt initialization cleanupRick Farrington2017-06-022-12/+17
| | | | | | | | | | | | | | | | | Set initialization state variable to (reflect interrupt initialization) at correct time (immediately after having configured interrupts). This fixes problem of inconsistent IRQ allocation in case of [obscure] failure when negotiating with PF driver during init. Clean-up of interrupt enablement during initialization & avoid potential race condition with chip-specific code (i.e. perform interrupt control in main driver module). Added explanatory comments regarding interrupt enablement. Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com> Signed-off-by: Satanand Burla <satananda.burla@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4: fix incorrect cim_la output for T6Ganesh Goudar2017-06-021-1/+10
| | | | | | | take care of UpDbgLaRdPtr[0-3] restriction for T6. Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'sctp-improve-asoc-streams-management'David S. Miller2017-06-0210-91/+78Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | Xin Long says: ==================== sctp: improve asoc streams management This patchset changes to define asoc->stream as an object, and also improve some codes to make it more clearly. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * sctp: merge sctp_stream_new and sctp_stream_initXin Long2017-06-024-26/+17Star
| | | | | | | | | | | | | | | | | | | | | | | | Since last patch, sctp doesn't need to alloc memory for asoc->stream any more. sctp_stream_new and sctp_stream_init both are used to alloc memory for stream.in or stream.out, and their names are also confusing. This patch is to merge them into sctp_stream_init, and only pass stream and streamcnt parameters into it, instead of the whole asoc. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sctp: define the member stream as an object instead of pointer in asocXin Long2017-06-0210-69/+65Star
|/ | | | | | | | | | | As Marcelo's suggestion, stream is a fixed size member of asoc and would not grow with more streams. To avoid an allocation for it, this patch is to define it as an object instead of pointer and update the places using it, also create sctp_stream_update() called in sctp_assoc_update() to migrate the stream info from one stream to another. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch '40GbE' of ↵David S. Miller2017-06-0219-1435/+1109Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2017-06-01 This series contains updates to i40e, i40evf and the "new" AVF virtchnl. This is the introduction of the Intel(R) Ethernet Adaptive Virtual Function driver code and device ID, as presented at the NetDEV 1.2 conference in 2016. http://netdevconf.org/1.2/session.html?anjali-singhai The idea is to convert the interface between the i40evf driver and the parent i40e PF driver to be generic, as the i40evf driver should in the future be able to run on top of other Intel PF drivers, and negotiate any features beyond a "base expected" set. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * i40evf: update i40evf.txt with new contentJesse Brandeburg2017-06-011-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The addition of the AVF and virtchnl code to the i40evf driver means we should update the i40evf.txt file with the most up to date information. It seems this file hasn't been updated in a while, so the changes cover a little more than just AVF, but it's all only in the i40evf.txt. 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>
| * i40evf: Add support for Adaptive Virtual FunctionPreethi Banala2017-06-014-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add device ID define and mac_type assignment needed for Adaptive Virtual Function (VF Base Mode Support). Also, update version to v3.0.0 in order to indicate clearly that this is the first driver supporting the AVF device ID. Signed-off-by: Preethi Banala <preethi.banala@intel.com> 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>
| * virtchnl: Add compile time static asserts to validate structure sizesSridhar Samudrala2017-06-011-0/+50
| | | | | | | | | | | | | | | | | | | | | | This uses preprocessor tricks to make sure that a divide by zero occurs if a struct changes size outside the expected number of bytes. Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com> 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>
| * virtchnl: Add pad fields to a couple of structuresSridhar Samudrala2017-06-011-0/+3
| | | | | | | | | | | | | | | | | | | | This removes holes and makes structure sizes consistent across 32 and 64 bit builds. Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com> 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/virtchnl: move function to virtchnlJesse Brandeburg2017-06-012-149/+148Star
| | | | | | | | | | | | | | | | | | | | | | | | | | This moves a function that is needed for the virtchnl interface from the i40e PF driver over to the virtchnl.h file. It was manually verified that the function in question is unchanged except for the function name and function header, which explains the slight difference in the number of lines removed/added. 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>
| * virtchnl: finish conversion to virtchnl interfaceJesse Brandeburg2017-06-016-65/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the complete version of the virtchnl.h file with final renames, and fixes the related code in i40e and i40evf. It also expands comments, and adds details on the usage of certain fields. In addition, due to the changes a couple of casts are needed to prevent errors found by sparse after renaming some fields. 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>
| * i40evf/virtchnl: whitespace cleanupsJesse Brandeburg2017-06-013-13/+8Star
| | | | | | | | | | | | | | | | | | This patch fixes up a bunch of whitespace issues introduced by the previous automated change of name from i40e to virtchnl. 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/virtchnl: refactor code for validate checksJesse Brandeburg2017-06-012-16/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change updates the arguments passed to the validate function and fixes the caller, as well as uses the new return values added to virtchnl.h One other minor tweak, remove a duplicate set to zero of valid_len. This is in preparation for moving the function to virtchnl.h. 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>
| * virtchnl: convert to new macrosJesse Brandeburg2017-06-013-6/+6
| | | | | | | | | | | | | | | | | | As part of the conversion, change the arguments to VF_IS_V1[01] macros and move them to virtchnl.h 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>
| * virtchnl: move some code to core driverJesse Brandeburg2017-06-011-12/+18
| | | | | | | | | | | | | | | | | | | | Before moving this function over to virtchnl.h, move some driver specific checks that had snuck into a fairly generic function, back into the caller of the function. 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>
| * virtchnl: rename i40e to generic virtchnlJesse Brandeburg2017-06-0111-498/+499
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This morphs all the i40e and i40evf references to/in virtchnl.h to be generic, using only automated methods. Updates all the callers to use the new names. A followup patch provides separate clean ups for messy line conversions from these "automatic" changes, to make them more reviewable. Was executed with the following sed script: sed -i -f transform_script drivers/net/ethernet/intel/i40e/i40e_client.c sed -i -f transform_script drivers/net/ethernet/intel/i40e/i40e_prototype.h sed -i -f transform_script drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c sed -i -f transform_script drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40e_common.c sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40e_prototype.h sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40evf.h sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40evf_client.c sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40evf_main.c sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c sed -i -f transform_script include/linux/avf/virtchnl.h transform_script: ----8<---- s/I40E_VIRTCHNL_SUPPORTED_QTYPES/SAVE_ME_SUPPORTED_QTYPES/g s/I40E_VIRTCHNL_VF_CAP/SAVE_ME_VF_CAP/g s/I40E_VIRTCHNL_/VIRTCHNL_/g s/i40e_virtchnl_/virtchnl_/g s/i40e_vfr_/virtchnl_vfr_/g s/I40E_VFR_/VIRTCHNL_VFR_/g s/VIRTCHNL_OP_ADD_ETHER_ADDRESS/VIRTCHNL_OP_ADD_ETH_ADDR/g s/VIRTCHNL_OP_DEL_ETHER_ADDRESS/VIRTCHNL_OP_DEL_ETH_ADDR/g s/VIRTCHNL_OP_FCOE/VIRTCHNL_OP_RSVD/g s/SAVE_ME_SUPPORTED_QTYPES/I40E_VIRTCHNL_SUPPORTED_QTYPES/g s/SAVE_ME_VF_CAP/I40E_VIRTCHNL_VF_CAP/g ----8<---- 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: use new unified virtchnl header fileJesse Brandeburg2017-06-014-452/+3Star
| | | | | | | | | | | | | | | | | | | | This patch changes the i40e driver to start using the new virtchnl interface header file, and removes an already existing duplicate of the i40e_virtchnl.h file contained in the i40e directory. 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: create and use new unified header fileJesse Brandeburg2017-06-015-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves a header for i40evf to include/linux/avf/virtchnl.h. The directory name AVF is an acronym for the Intel(R) Adaptive Virtual Function. This first step creates the new file, which is a rename of drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h to include/linux/avf/virtchnl.h, and should show up in git as a rename when using git log --follow. To keep things building after the move, the changes to the i40evf driver are made to point to the new include file location. 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>
| * i40evf: drop i40e_type.h includeJesse Brandeburg2017-06-011-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | This drops the i40e_type.h include in anticipation of the next patch which moves this file to a location where type.h doesn't exist, and all the places this file is included already include i40e_type.h before this file. 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>
* | Merge branch 'qed-Enhance-storage-APIs'David S. Miller2017-06-0210-5/+252
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yuval Mintz says: ==================== qed: Enhance storage APIs This series is intended to add additional information and features to the API between qed and its storage protocol drivers [qedi, qedf]. Patch #2 adds some information stored on device such as wwpn & wwnn to allow qedf utilize it; #1 fixes an issue with the reading of those values [which were unused until now]. Patch #3 would allow the protocol drivers access to images on persistent storage which is a prerequirement for adding boot from SAN support. Patch #4 adds infrastrucutre to a future feature for qedi. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | qed: Add support for changing iSCSI macMintz, Yuval2017-06-023-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | Enhance API between qedi and qed, allowing qedi to inform device's firmware when the iSCSI mac is to be changed. Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | qed: Support NVM-image reading APIMintz, Yuval2017-06-024-0/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | Storage drivers require images from the nvram in boot-from-SAN scenarios. This provides the necessary API between qed and the protocol drivers to perform such reads. Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | qed: Share additional information with qedfMintz, Yuval2017-06-025-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Share several new tidbits with qedf: - wwpn & wwnn - Absolute pf-id [this one is actually meant for qedi as well] - Number of available CQs While we're at it, now that qedf will be aware of the available CQs we can add some validation on the inputs it provides. Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | qed: Correct order of wwnn and wwpnMintz, Yuval2017-06-021-4/+4
|/ / | | | | | | | | | | | | | | | | | | | | Driver reads values via HSI splitting this 8-byte into 2 32-bit values and builds a single u64 field - but it does so by shifting the lower field instead of the higher. Luckily, we still don't use these fields for anything - but we're about to start. Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | team: add macro MODULE_ALIAS_TEAM_MODE for team mode aliasZhang Shengju2017-06-026-5/+7
| | | | | | | | | | | | | | | | | | Add a new macro MODULE_ALIAS_TEAM_MODE to unify and simplify the declaration of team mode alias. Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'dsa-tagger-simplification'David S. Miller2017-06-0113-90/+47Star
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vivien Didelot says: ==================== net: dsa: tagger simplification This series clarifies the hot path, removes the labels in tagging implementations, and frees the original SKB in the xmit caller. Changes in v3: - drop removal of usused rcv arguments because they will be used later - include the new ksz tagging implementation - add reviewers' tags Changes in v2: - do not remove tagger function copies - document hot path requirements - make netdev_uses_dsa simpler - add reviewers' tags ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: factor skb freeing on xmitVivien Didelot2017-06-019-39/+16Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of a86d8becc3f0 ("net: dsa: Factor bottom tag receive functions"), the rcv caller frees the original SKB in case or error. Be symmetric with that and make the xmit caller do the same. At the same time, fix the checkpatch NULL comparison check: CHECK: Comparison to NULL could be written "!nskb" #208: FILE: net/dsa/tag_trailer.c:35: + if (nskb == NULL) Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: remove out_drop label in taggers rcvVivien Didelot2017-06-016-42/+24Star
| | | | | | | | | | | | | | | | | | Many rcv functions from net/dsa/tag_*.c have a useless out_drop goto label which simply returns NULL. Kill it in favor of the obvious. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: remove dsa_uses_tagged_protocolVivien Didelot2017-06-011-7/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | Since dev->dsa_ptr is a pointer to a dsa_switch_tree, there is no need to have another inline helper just to check rcv. Remove dsa_uses_tagged_protocol and check dsa_ptr && dsa_ptr->rcv together at the same time. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: do not cast dstVivien Didelot2017-06-012-2/+2
| | | | | | | | | | | | | | | | | | | | dsa_ptr is not a void pointer anymore since Nov 2011, as of cf50dcc24f82 ("dsa: Change dsa_uses_{dsa, trailer}_tags() into inline functions"), but an explicit dsa_switch_tree pointer, thus remove the (void *) cast. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: comment hot path requirementsVivien Didelot2017-06-012-0/+4
|/ | | | | | | | | The DSA layer uses inline helpers and copy of the tagging functions for faster access in hot path. Add comments to detail that. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum: Add bridge dependency for spectrumIdo Schimmel2017-06-011-0/+1
| | | | | | | | | | | | | | | | | | | | | When BRIDGE is a loadable module, MLXSW_SPECTRUM mustn't be built-in: drivers/built-in.o: In function `mlxsw_sp_bridge_device_create': drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:145: undefined reference to `br_vlan_enabled' drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c:158: undefined reference to `br_multicast_enabled' drivers/built-in.o: In function `mlxsw_sp_dev_rif_type': drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:2972: undefined reference to `br_vlan_enabled' drivers/built-in.o: In function `mlxsw_sp_inetaddr_vlan_event': drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3310: undefined reference to `br_vlan_enabled' Add Kconfig dependency to enforce usable configurations. Fixes: c57529e1d5d8 ("mlxsw: spectrum: Replace vPorts with Port-VLAN") Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reported-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Tested-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'stmmac-add-dwmac-sun8i-ethernet-driver'David S. Miller2017-06-0123-5/+1303
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Corentin Labbe says: ==================== net-next: stmmac: add dwmac-sun8i ethernet driver This patch series add the driver for dwmac-sun8i which handle the Ethernet MAC present on Allwinner H3/H5/A83T/A64 SoCs. This driver is the continuation of the sun8i-emac driver. During the development, it appeared that in fact the hardware was a modified version of some dwmac. So the driver is now written as a glue driver for stmmac. It supports 10/100/1000 Mbit/s speed with half/full duplex. It can use an internal PHY (MII 10/100) or an external PHY via RGMII/RMII. This patch series enable the driver only for the H3/A64/H5 SoC since A83T doesn't have the necessary clocks present in mainline. The driver have been tested on the following boards: - H3 Orange PI PC, BananaPI-M2+ - A64 Pine64, BananaPi-M64 - A83T BananaPI-M3 The first two patchs are some mandatory changes for letting dwmac-sun8i be used. The following three patchs add the driver and its documentation. The remaining are DT patch enabling it. Regards Corentin Labbe Changes since v5: - Added DT patch for NanoPi neo - Use the new adjust_link variables (speedxxx/speedmask) - Made the timeout of readl_poll_timeout from 10 to 100ms - Fix sun8i_unpower_phy that could be called twice - Replace phy by phy-handle in doc/dwmac-sun8i.txt Changes since v4: - Re-ordered by alphabetical order some DT nodes - Simplified power/unpower_phy functions by testing the use of internal_phy - Added a patch for adding dwmac-sun8i to arm64 defconfig - Fix a typo in sun50i-a64-system-controller (wrongly used sun8i) - Reworked uc/mc filter address setting Changes since v3: - Renamed tx-delay/rx-delay to tx-delay-ps/rx-delay-ps - fix syscon compatible example - Changed parameter type for setup() function - Dropped some DT patchs for boards which I could not test further Changes since v2: - corrected order of syscon compatible - added compatible = "ethernet-phy-ieee802.3-c22 to PHY - added set_mac function Changes since v1: - added TX/RX delay units - splitted syscon documentation in its own patch - regulator is now disabled after clk_prepare_enable(gmac->tx_clk) error - Fixed a memory leak on mac_device_info - Use now generic pin config for all DT stuff - CONFIG_DWMAC_SUN8I is now set to y in defconfigs ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * arm64: defconfig: Enable dwmac-sun8i driver on defconfigLABBE Corentin2017-06-011-0/+1
| | | | | | | | | | | | | | Enable the dwmac-sun8i ethernet driver as a module in the ARM64 defconfig. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * arm: multi_v7: Enable dwmac-sun8i driver on multi_v7_defconfigLABBE Corentin2017-06-011-0/+1
| | | | | | | | | | | | | | Enable the dwmac-sun8i driver in the multi_v7 default configuration Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * arm: sunxi: Enable dwmac-sun8i driver on sunxi_defconfigLABBE Corentin2017-06-011-0/+1
| | | | | | | | | | | | | | Enable the dwmac-sun8i driver in the sunxi default configuration Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * arm64: allwinner: bananapi-m64: Enable dwmac-sun8iLABBE Corentin2017-06-011-0/+15
| | | | | | | | | | | | | | | | The dwmac-sun8i hardware is present on the BananaPi M64. It uses an external PHY rtl8211e via RGMII. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>