summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bnxt_en: Add BCM5731X and BCM5741X device IDs.Michael Chan2016-06-151-1/+29
| | | | | Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Add GRO logic for BCM5731X chips.Michael Chan2016-06-152-2/+103
| | | | | | | | | | | Add bnxt_gro_func_5731x() to handle GRO packets for this chip. The completion structures used in the new chip have new data to help determine the header offsets. The offsets can be off by 4 if the packet is an internal loopback packet (e.g. from one VF to another VF). Some additional logic is added to adjust the offsets if it is a loopback packet. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Refactor bnxt_gro_skb().Michael Chan2016-06-152-19/+36
| | | | | | | | Newer chips require different logic to handle GRO packets. So refactor the code so that we can call different functions depending on the chip. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Define the supported chip numbers.Michael Chan2016-06-152-1/+43
| | | | | | | | | Define all the supported chip numbers and chip categories. Store the chip_num returned by firmware. If the call to get the version and chip number fails, we should abort. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Add PCI device ID for 57404 NPAR devices.Michael Chan2016-06-151-0/+3
| | | | | Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Enable NPAR (NIC Partitioning) Support.Satish Baddipadige2016-06-153-5/+17
| | | | | | | | | | NPAR type is read from bnxt_hwrm_func_qcfg. Do not allow changing link parameters if in NPAR mode sinc ethe port is shared among multiple partitions. The link parameters are set up by firmware. Signed-off-by: Satish Baddipadige <sbaddipa@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Handle VF_CFG_CHANGE event from firmware.Michael Chan2016-06-152-0/+10
| | | | | | | | | When the VF driver gets this event, the VF configuration has changed (such as default VLAN). The VF driver will initiate a silent reset to pick up the new configuration. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Add new function bnxt_reset().Michael Chan2016-06-151-12/+22
| | | | | | | | | | When a default VLAN is added to the VF, the VF driver needs to reset to pick up the default VLAN ID. We can use the same tx timeout reset logic to do that, without the debug output. This new function, with the silent parameter to suppress debug output will now serve both purposes. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Add function for VF driver to query default VLAN.Michael Chan2016-06-152-2/+48
| | | | | | | | | | | | | | | The PF can setup a default VLAN for a VF. The default VLAN tag is automatically inserted and stripped without the knowledge of the stack running on the VF. The VF driver needs to know that default VLAN is enabled as VLAN acceleration on the RX side is no longer supported. Call netdev_update_features() to fix up the VLAN features as necessary. Also, VLAN strip mode must be enabled to strip out the default VLAN tag. Only allow VF default VLAN to be set if the firmware spec is >= 1.2.1. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: enic: move to new ethtool api {get|set}_link_ksettingsPhilippe Reynes2016-06-141-12/+16
| | | | | | | | The ethtool api {get|set}_settings is deprecated. We move the enic driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* virtio_net: fix csum generation for virtio-net devicesMike Rapoport2016-06-141-4/+4
| | | | | | | | | | | | | | | | The commit e858fae2b0b8 ("virtio_net: use common code for virtio_net_hdr and skb GSO conversion") replaced the tun code for header manipulation with the generic helpers. While doing so, it implictly moved the skb_partial_csum_set() invocation after eth_type_trans(), which invalidate the current gso start/offset values. Fix it by moving the helper invocation before the mac pulling. Fixes: e858fae2b0b8 ("virtio_net: use common code for virtio_net_hdr and skb GSO conversion") Reported-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sched: remove NET_XMIT_POLICEDFlorian Westphal2016-06-136-8/+4Star
| | | | | | | | | | | | | | | | sch_atm returns this when TC_ACT_SHOT classification occurs. But all other schedulers that use tc_classify (htb, hfsc, drr, fq_codel ...) return NET_XMIT_SUCCESS | __BYPASS in this case so just do that in atm. BATMAN uses it as an intermediate return value to signal forwarding vs. buffering, but it did not return POLICED to callers outside of BATMAN. Reviewed-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: fec: handle small PHY reset durations more preciselyStefan Wahren2016-06-131-1/+6
| | | | | | | | | | Since msleep is based on jiffies the PHY reset could take longer than expected. So use msleep for values greater than 20 msec otherwise usleep_range. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Acked-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv6: use TOS marks from sockets for routing decisionHannes Frederic Sowa2016-06-126-11/+23
| | | | | | | | | | In IPv6 the ToS values are part of the flowlabel in flowi6 and get extracted during fib rule lookup, but we forgot to correctly initialize the flowlabel before the routing lookup. Reported-by: <liam.mcbirnie@boeing.com> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'remove-qdisc-throttle'David S. Miller2016-06-1110-45/+15Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eric Dumazet says: ==================== net_sched: remove qdisc_is_throttled() HTB, CBQ and HFSC pay a very high cost updating the qdisc 'throttled' status that nothing but CBQ seems to use. CBQ usage is flaky anyway, since no qdisc ->enqueue() updates the 'throttled' qdisc status. This looks like some 'optimization' that actually cost more than code without the optimization, and might cause latency issues with CBQ. In my tests, I could achieve a 8 % performance increase in TCP_RR workload through HTB qdisc, in presence of throttled classes, and 5 % without throttled classes. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net_sched: remove generic throttled managementEric Dumazet2016-06-119-35/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __QDISC_STATE_THROTTLED bit manipulation is rather expensive for HTB and few others. I already removed it for sch_fq in commit f2600cf02b5b ("net: sched: avoid costly atomic operation in fq_dequeue()") and so far nobody complained. When one ore more packets are stuck in one or more throttled HTB class, a htb dequeue() performs two atomic operations to clear/set __QDISC_STATE_THROTTLED bit, while root qdisc lock is held. Removing this pair of atomic operations bring me a 8 % performance increase on 200 TCP_RR tests, in presence of throttled classes. This patch has no side effect, since nothing actually uses disc_is_throttled() anymore. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net_sched: netem: remove qdisc_is_throttled() useEric Dumazet2016-06-111-3/+0Star
| | | | | | | | | | | | | | | | | | | | Looks like it is only there as some optimization attempt. Since __QDISC_STATE_THROTTLED set/unset is way too expensive, and netem is the last user, just remove this check. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net_sched: cbq: remove a flaky use of qdisc_is_throttled()Eric Dumazet2016-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | So far no qdisc ever unset the throttled bit at enqueue() time, so CBQ usage of qdisc_is_throttled() was flaky. Since __QDISC_STATE_THROTTLED set/unset is way too expensive considering that only CBQ was eventually caring for this status, it would make sense to implement a Qdisc ops ->is_throttled() if we find that this is needed. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net_sched: sch_plug: use a private throttled statusEric Dumazet2016-06-111-6/+8
|/ | | | | | | | We want to get rid of generic qdisc throttled management, so this qdisc has to use a private flag. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'mdio-iProc-SOC'David S. Miller2016-06-1115-15/+550
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pramod Kumar says: ==================== Add MDIO bus multiplexer support for iProc SoCs Broadcom iProc based SoCs use a MDIO bus multiplexer where child buses could be internal as well external to SoCs. These buses could supports MDIO transaction compatible to C-22/C-45. Broadcom MDIO bus multiplexer is an integrated multiplexer where child bus selection and mdio transaction logic lies inside multiplexer itself. To accommodate this multiplexer in existing mux framework below changes were required- 1. Passed MDIO parent bus via mdio_mux_init to MDIO mux framework. This patch set includes MDIO bus multiplexer driver along with above framework change. It includes one external bus node having Ethernet PHY attached and two internal bus node holding PCIe PHYs. This patch series is based on v4.7-rc1 and is available from github- repo: https://github.com/Broadcom/arm64-linux.git branch:mdio-mux-v5 -Changes from v4: - disabled PCIe PHYs from dtsi and enabled in dts file. -Changes from v3: - Unregister and free the parent MDIO bus. - rebased on net-next/master branch. Reason for resend: -Rebased on v4.7-rc1 Changes from v2: -Addressed Rob's comments in this patch regarding typo/grammers. -Addressed David's comments regarding local variables order. -Removed property "mdio-integrated-mux" and used mdiobus_register() in place of of_mdiobus_regsiter(). -removed usage of IS_ERR_OR_NULL to IS_ERR in PCIe PHY driver. Changes from v1: - stop using "brcm,is_c45" from bus node as suggested by Andrew. MDIO PHY driver will logically OR MII_ADDR_C45 into the address when issues any C45 MDIO read/write transaction. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * phy: Add Northstar2 PCI Phy supportPramod Kumar2016-06-113-1/+124
| | | | | | | | | | | | | | | | | | | | | | Add PCI Phy support for Broadcom Northstar2 SoCs. This driver uses the interface from the iproc mdio mux driver to enable the devices respective phys. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jon Mason <jonmason@broadcom.com> Signed-off-by: Pramod Kumar <pramod.kumar@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * binding: PHY: Binding doc for NS2 PCIe PHYs.Pramod Kumar2016-06-111-0/+27
| | | | | | | | | | | | | | | | | | Binding doc for NS2 PCIe PHYs. Signed-off-by: Pramod Kumar <pramod.kumar@broadcom.com> Signed-off-by: Jon Mason <jonmason@broadcom.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: mdio-mux: Add MDIO mux driver for iProc SoCsPramod Kumar2016-06-113-0/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iProc based SoCs supports the integrated mdio multiplexer which has the bus selection as well as mdio transaction generation logic inside. This multiplexer has child buses for PCIe, SATA, USB and ETH. These buses could be internal or external to SOC where PHYs are attached. These buses could use C-45 or C-22 mdio transaction. Signed-off-by: Pramod Kumar <pramod.kumar@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>
| * dt: mdio-mux: Add mdio multiplexer driver nodePramod Kumar2016-06-112-0/+55
| | | | | | | | | | | | | | | | | | | | Add integrated MDIO multiplexer driver node which contains two mux PCIe bus and one ethernet bus along with phys lying on these bus. Signed-off-by: Pramod Kumar <pramod.kumar@broadcom.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * binding: mdio-mux: Add DT binding doc for Broadcom MDIO bus multiplexerPramod Kumar2016-06-111-0/+59
| | | | | | | | | | | | | | | | | | | | Add DT binding doc for Broadcom MDIO bus multiplexer driver. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Pramod Kumar <pramod.kumar@broadcom.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * binding: Make "mdio-parent-bus" property from mandatory to optionalPramod Kumar2016-06-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change "mdio-parent-bus" from mandatory section to optional as it won't be required by integrated MDIO multiplexer which has bus selection and mdio transaction generation logic, integrated inside. Signed-off-by: Pramod Kumar <pramod.kumar@broadcom.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * mdio: mux: Enhanced MDIO mux framework for integrated multiplexersPramod Kumar2016-06-114-13/+23
|/ | | | | | | | | | | | | | An integrated multiplexer uses same address space for "muxed bus selection" and "generation of mdio transaction" hence its good to register parent bus from mux driver. Hence added a mechanism where mux driver could register a parent bus and pass it down to framework via mdio_mux_init api. Signed-off-by: Pramod Kumar <pramod.kumar@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>
* sctp: sctp should change socket state when shutdown is receivedXin Long2016-06-112-3/+9
| | | | | | | | | | | | | | | | | Now sctp doesn't change socket state upon shutdown reception. It changes just the assoc state, even though it's a TCP-style socket. For some cases, if we really need to check sk->sk_state, it's necessary to fix this issue, at least when we use ss or netstat to dump, we can get a more exact information. As an improvement, we will change sk->sk_state when we change asoc->state to SHUTDOWN_RECEIVED, and also do it in sctp_shutdown to keep consistent with sctp_close. Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Marcelo R. Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge tag 'mac80211-next-for-davem-2016-06-09' of ↵David S. Miller2016-06-1121-263/+955
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== For the next cycle, we have the following: * the biggest change is Michał's work on integrating FQ/codel with the mac80211 internal software queues * cfg80211 connect result gets clarified for the "no connection at all" case * advertisement of per-interface type capabilities, in case they differ (which makes a lot of sense for some capabilities) * most of the nl80211 & hwsim unprivileged namespace operation changes * human-readable VHT capabilities in debugfs * some other cleanups, like spelling ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * mac80211: implement codel on fair queuing flowsMichal Kazior2016-06-093-2/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no other limit other than a global packet count limit when using software queuing. This means a single flow queue can grow insanely long. This is particularly bad for TCP congestion algorithms which requires a little more sophisticated frame dropping scheme than a mere headdrop on limit overflow. Hence apply (a slighly modified, to fit the knobs) CoDel5 on flow queues. This improves TCP convergence and stability when combined with wireless driver which keeps its own tx queue/fifo at a minimum fill level for given link conditions. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: add debug knobs for fair queuingMichal Kazior2016-06-091-0/+173
| | | | | | | | | | | | | | | | | | | | This adds a debugfs entry to read and modify some fq parameters. This makes it easy to debug, test and experiment. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> [remove module parameter for now] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: implement fair queueing per txqMichal Kazior2016-06-098-64/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mac80211's software queues were designed to work very closely with device tx queues. They are required to make use of 802.11 packet aggregation easily and efficiently. Due to the way 802.11 aggregation is designed it only makes sense to keep fair queuing as close to hardware as possible to reduce induced latency and inertia and provide the best flow responsiveness. This change doesn't translate directly to immediate and significant gains. End result depends on driver's induced latency. Best results can be achieved if driver keeps its own tx queue/fifo fill level to a minimum. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: skip netdev queue control with software queuingMichal Kazior2016-06-097-49/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qdiscs are designed with no regard to 802.11 aggregation requirements and hand out packet-by-packet with no guarantee they are destined to the same tid. This does more bad than good no matter how fairly a given qdisc may behave on an ethernet interface. Software queuing used per-AC netdev subqueue congestion control whenever a global AC limit was hit. This meant in practice a single station or tid queue could starve others rather easily. This could resonate with qdiscs in a bad way or could just end up with poor aggregation performance. Increasing the AC limit would increase induced latency which is also bad. Disabling qdiscs by default and performing taildrop instead of netdev subqueue congestion control on the other hand makes it possible for tid queues to fill up "in the meantime" while preventing stations starving each other. This increases aggregation opportunities and should allow software queuing based drivers achieve better performance by utilizing airtime more efficiently with big aggregates. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * nl80211: clarify nl80211_set_reg() success pathJohannes Berg2016-06-091-4/+2Star
| | | | | | | | | | | | | | | | | | Setting rd to NULL to avoid freeing it, just to be able to return from the function in a single place, doesn't make much sense. Return the set_regdom() return value directly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * wext: reformat struct/union declarationsJohannes Berg2016-06-091-41/+22Star
| | | | | | | | | | | | | | | | Everytime I need to look for these, my usual strategy fails because it assumes the right formatting. Fix the formatting here to make it consistent with the rest of the kernel. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * nl80211: Fix checkpatch warnings about blank linesKirtika Ruchandani2016-06-091-12/+10Star
| | | | | | | | | | | | | | | | | | | | | | This patch fixes the following checkpatch.pl issues - - Please don't use multiple blank lines - Blank lines aren't necessary before a close brace - Missing a blank line after declarations Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Kirtika Ruchandani <kirtika.ruchandani@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * nl80211: Fix spellingKirtika Ruchandani2016-06-091-1/+1
| | | | | | | | | | | | | | | | Fix 'implementation' spelling, reported by checkpatch.pl Signed-off-by: Kirtika Ruchandani <kirtika.ruchandani@gmail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211: Advertise extended capabilities per interface type to userspaceKanchanapally, Vidyullatha2016-05-314-2/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | The driver extended capabilities may differ for different interface types which the userspace needs to know (for example the fine timing measurement initiator and responder bits might differ for a station and AP). Add a new nl80211 attribute to provide extended capabilities per interface type to userspace. Signed-off-by: Vidyullatha Kanchanapally <vkanchan@qti.qualcomm.com> Reviewed-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211: Allow cfg80211_connect_result() errors to be distinguishedJouni Malinen2016-05-317-24/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the status parameter to cfg80211_connect_result() was documented as using WLAN_STATUS_UNSPECIFIED_FAILURE (1) when the real status code for the failure is not known. This value can be used by an AP (and often is) and as such, user space cannot distinguish between explicitly rejected authentication/association and not being able to even try to associate or not receiving a response from the AP. Add a new inline function, cfg80211_connect_timeout(), to be used when the driver knows that the connection attempt failed due to a reason where connection could not be attempt or no response was received from the AP. The internal functions now allow a negative status value (-1) to be used as an indication of this special case. This results in the NL80211_ATTR_TIMED_OUT to be added to the NL80211_CMD_CONNECT event to allow user space to determine this case was hit. For backwards compatibility, NL80211_STATUS_CODE with the value WLAN_STATUS_UNSPECIFIED_FAILURE is still indicated in the event in such a case. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> [johannes: fix cfg80211_connect_bss() prototype to use int for status, add cfg80211_connect_timeout() to docbook, fix docbook] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: add vht cap decode to debugfsBen Greear2016-05-311-2/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it a lot easier to understand the capabilities used by the station: VHT supported cap: 0x300819b2 MAX-MPDU-11454 80Mhz RXLDPC SHORT-GI-80 TXSTBC RXSTBC_1 SU-BEAMFORMER-CAPABLE SU-BEAMFORMEE-CAPABLE BEAMFORMEE-STS: 0x0 SOUNDING-DIMENSIONS: 0x0 MU-BEAMFORMER-CAPABLE MPDU-LENGTH-EXPONENT: 0x0 LINK-ADAPTATION-VHT-MRQ-MFB: 0x0 RX-ANTENNA-PATTERN TX-ANTENNA-PATTERN RX MCS: fffe TX MCS: fffe Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: Allow managing radios from non-initial namespacesMartin Willi2016-05-311-3/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While wiphys can be moved into network namespaces over nl80211, the creation and removal of hwsim radios is currently limited to the initial namespace. This patch allows management of namespaced radios from the owning namespace by setting genetlink netnsok. To prevent two arbitrary namespaces to communicate over the simulated shared medium, radios are separated by netgroups. Each radio created in the same namespace lives in the same netgroup and hence can communicate with other radios in that group. When moving radios to other namespaces, the netgroup is preserved, so two radios having the same netgroup can communicate even if not in the same namespace; This allows a controlling namespace to create radios and move them to other namespaces for communication. When a net namespace owning a radio exits, the radio is destroyed unless it was created in the initial network namespace. This keeps the previous behavior by returning them to the init namespace, but prevents unprivileged users from creating radios in the initial namespace. Signed-off-by: Martin Willi <martin@strongswan.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * nl80211: Allow privileged operations from user namespacesMartin Willi2016-05-311-76/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While a wiphy can be transferred to network namespaces, a process having CAP_NET_ADMIN in a non-initial user namespace can not administrate such devices due to the genetlink GENL_ADMIN_PERM restrictions. For openvswitch having the same issue, a new GENL_UNS_ADMIN_PERM flag has been introduced, commit 4a92602aa1cd ("openvswitch: allow management from inside user namespaces"). This patch changes all privileged operations operating on a wiphy, dev or wdev to allow their administration using the same mechanism. All operations use either NEED_WIPHY, NEED_WDEV or NEED_NETDEV, which implies a namespace aware lookup of the device. The only exception is NL80211_CMD_SET_WIPHY, which explicitly uses a namespace aware phy lookup. Signed-off-by: Martin Willi <martin@strongswan.org> [also allow cancel scan, for completeness] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | Merge branch 'arm64-bpf'David S. Miller2016-06-113-16/+99
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zi Shen Lim says: ==================== arm64 BPF JIT updates Updates for arm64 eBPF JIT. The main addition here is implementation of bpf_tail_call. Changes since v2: - None. Resubmit per David Miller. Changes since v1: - Added patch #1 to address build error due to missing header inclusion in linux/bpf.h. (Thanks to suggestion and ack by Daniel Borkmann) Ordered it ahead of bpf_tail_call patch #2 so build error is not triggered. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * | arm64: bpf: optimize LD_ABS, LD_INDZi Shen Lim2016-06-111-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | Remove superfluous stack frame, saving us 3 instructions for every LD_ABS or LD_IND. Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | arm64: bpf: optimize JMP_CALLZi Shen Lim2016-06-111-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | Remove superfluous stack frame, saving us 3 instructions for every JMP_CALL. Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | arm64: bpf: implement bpf_tail_call() helperZi Shen Lim2016-06-112-10/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for JMP_CALL_X (tail call) introduced by commit 04fd61ab36ec ("bpf: allow bpf programs to tail-call other bpf programs"). bpf_tail_call() arguments: ctx - context pointer passed to next program array - pointer to map which type is BPF_MAP_TYPE_PROG_ARRAY index - index inside array that selects specific program to run In this implementation arm64 JIT jumps into callee program after prologue, so callee program reuses the same stack. For tail_call_cnt, we use the callee-saved R26 (which was already saved/restored but previously unused by JIT). With this patch a tail call generates the following code on arm64: if (index >= array->map.max_entries) goto out; 34: mov x10, #0x10 // #16 38: ldr w10, [x1,x10] 3c: cmp w2, w10 40: b.ge 0x0000000000000074 if (tail_call_cnt > MAX_TAIL_CALL_CNT) goto out; tail_call_cnt++; 44: mov x10, #0x20 // #32 48: cmp x26, x10 4c: b.gt 0x0000000000000074 50: add x26, x26, #0x1 prog = array->ptrs[index]; if (prog == NULL) goto out; 54: mov x10, #0x68 // #104 58: ldr x10, [x1,x10] 5c: ldr x11, [x10,x2] 60: cbz x11, 0x0000000000000074 goto *(prog->bpf_func + prologue_size); 64: mov x10, #0x20 // #32 68: ldr x10, [x11,x10] 6c: add x10, x10, #0x20 70: br x10 74: Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bpf: fix missing header inclusionZi Shen Lim2016-06-111-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0fc174dea545 ("ebpf: make internal bpf API independent of CONFIG_BPF_SYSCALL ifdefs") introduced usage of ERR_PTR() in bpf_prog_get(), however did not include linux/err.h. Without this patch, when compiling arm64 BPF without CONFIG_BPF_SYSCALL: ... In file included from arch/arm64/net/bpf_jit_comp.c:21:0: include/linux/bpf.h: In function 'bpf_prog_get': include/linux/bpf.h:235:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration] return ERR_PTR(-EOPNOTSUPP); ^ include/linux/bpf.h:235:9: warning: return makes pointer from integer without a cast [-Wint-conversion] In file included from include/linux/rwsem.h:17:0, from include/linux/mm_types.h:10, from include/linux/sched.h:27, from arch/arm64/include/asm/compat.h:25, from arch/arm64/include/asm/stat.h:23, from include/linux/stat.h:5, from include/linux/compat.h:12, from include/linux/filter.h:10, from arch/arm64/net/bpf_jit_comp.c:22: include/linux/err.h: At top level: include/linux/err.h:23:35: error: conflicting types for 'ERR_PTR' static inline void * __must_check ERR_PTR(long error) ^ In file included from arch/arm64/net/bpf_jit_comp.c:21:0: include/linux/bpf.h:235:9: note: previous implicit declaration of 'ERR_PTR' was here return ERR_PTR(-EOPNOTSUPP); ^ ... Fixes: 0fc174dea545 ("ebpf: make internal bpf API independent of CONFIG_BPF_SYSCALL ifdefs") Suggested-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'tcp_nv'David S. Miller2016-06-116-2/+502
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lawrence Brakmo says: ==================== tcp: add NV congestion control Removed most of the module parameters Tested in a rack using between 1 and 380 active TCP-NV flows. Consists of the following patches: [PATCH net-next v2 1/2] tcp: add in_flight to tcp_skb_cb [PATCH net-next v2 2/2] tcp: add NV congestion control ==================== Signed-off-by: Lawrence Brakmo <brakmo@fb.com>
| * | tcp: add NV congestion controlLawrence Brakmo2016-06-113-0/+493
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TCP-NV (New Vegas) is a major update to TCP-Vegas. An earlier version of NV was presented at 2010's LPC. It is a delayed based congestion avoidance for the data center. This version has been tested within a 10G rack where the HW RTTs are 20-50us and with 1 to 400 flows. A description of TCP-NV, including implementation details as well as experimental results, can be found at: http://www.brakmo.org/networking/tcp-nv/TCPNV.html Signed-off-by: Lawrence Brakmo <brakmo@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | tcp: add in_flight to tcp_skb_cbLawrence Brakmo2016-06-113-2/+9
|/ / | | | | | | | | | | | | | | | | | | | | Add in_flight (bytes in flight when packet was sent) field to tx component of tcp_skb_cb and make it available to congestion modules' pkts_acked() function through the ack_sample function argument. Signed-off-by: Lawrence Brakmo <brakmo@fb.com> Acked-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>