summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* inet: Add a 2nd listener hashtable (port+addr)Martin KaFai Lau2017-12-034-15/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current listener hashtable is hashed by port only. When a process is listening at many IP addresses with the same port (e.g. [IP1]:443, [IP2]:443... [IPN]:443), the inet[6]_lookup_listener() performance is degraded to a link list. It is prone to syn attack. UDP had a similar issue and a second hashtable was added to resolve it. This patch adds a second hashtable for the listener's sockets. The second hashtable is hashed by port and address. It cannot reuse the existing skc_portaddr_node which is shared with skc_bind_node. TCP listener needs to use skc_bind_node. Instead, this patch adds a hlist_node 'icsk_listen_portaddr_node' to the inet_connection_sock which the listener (like TCP) also belongs to. The new portaddr hashtable may need two lookup (First by IP:PORT. Second by INADDR_ANY:PORT if the IP:PORT is a not found). Hence, it implements a similar cut off as UDP such that it will only consult the new portaddr hashtable if the current port-only hashtable has >10 sk in the link-list. lhash2 and lhash2_mask are added to 'struct inet_hashinfo'. I take this chance to plug a 4 bytes hole. It is done by first moving the existing bind_bucket_cachep up and then add the new (int lhash2_mask, *lhash2) after the existing bhash_size. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* udp: Move udp[46]_portaddr_hash() to net/ip[v6].hMartin KaFai Lau2017-12-034-38/+42
| | | | | | | | | | | | | This patch moves the udp[46]_portaddr_hash() to net/ip[v6].h. The function name is renamed to ipv[46]_portaddr_hash(). It will be used by a later patch which adds a second listener hashtable hashed by the address and port. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* inet: Add a count to struct inet_listen_hashbucketMartin KaFai Lau2017-12-032-2/+10
| | | | | | | | | | | This patch adds a count to the 'struct inet_listen_hashbucket'. It counts how many sk is hashed to a bucket. It will be used to decide if the (to-be-added) portaddr listener's hashtable should be used during inet[6]_lookup_listener(). Signed-off-by: Martin KaFai Lau <kafai@fb.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* enic: add sw timestamp supportGovindarajulu Varadarajan2017-12-032-0/+13
| | | | | | | | Add ethtool ops to advertise sw timestamping. Call skb_tx_timestamp() just before ringing the wq doorbell. Signed-off-by: Govindarajulu Varadarajan <gvaradar@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'hv_netvsc-minor-optimizations'David S. Miller2017-12-036-108/+73
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Stephen Hemminger says: ==================== hv_netvsc: minor optimizations These are a set of local optimizations the Hyper-V networking driver. Also include a vmbus patch in this set, because it depends on the netvsc that last used that function. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * vmbus: make hv_get_ringbuffer_availbytes localStephen Hemminger2017-12-032-22/+23
| | | | | | | | | | | | | | | | | | | | The last use of hv_get_ringbuffer_availbytes in drivers is now gone. Only used by the debug info routine so make it static. Also, add READ_ONCE() to avoid any possible issues with potentially volatile index values. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * hv_netvsc: optimize initialization of RNDIS headerStephen Hemminger2017-12-031-31/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | The memset of the whole maximum possible RNDIS header is unnecessary. For the main part of the header use a structure assignment. No need to memset the whole per packet info. Instead rely on caller to set what it wants. Also get rid of cast to void and signed/unsigned conversion. Now return pointer to per packet data (rather than the header) which simplifies use by code setting up the packet data. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * hv_netvsc: use reciprocal divide to speed up percent calculationStephen Hemminger2017-12-034-26/+21
| | | | | | | | | | | | | | | | | | | | | | | | Every packet sent checks the available ring space. The calculation can be sped up by using reciprocal divide which is multiplication. Since ring_size can only be configured by module parameter, so it doesn't have to be passed around everywhere. Also it should be unsigned since it is number of pages. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * hv_netvsc: replace divide with mask when computing paddingStephen Hemminger2017-12-031-1/+2
| | | | | | | | | | | | | | | | Packet alignment is always a power of 2 therefore modulus can be replaced with a faster and operation Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * hv_netvsc: don't need local xmit_moreStephen Hemminger2017-12-031-2/+1
| | | | | | | | | | | | | | | | Since skb is always non-NULL in the copy portion of netvsc_send do not need local variable. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * hv_netvsc: drop unused macrosStephen Hemminger2017-12-031-26/+0
|/ | | | | Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipvlan: Add new func ipvlan_is_valid_dev instead of duplicated codesGao Feng2017-12-031-16/+17
| | | | | | | | | There are multiple duplicated condition checks in the current codes, so I add the new func ipvlan_is_valid_dev instead of the duplicated codes to check if the netdev is real ipvlan dev. Signed-off-by: Gao Feng <gfree.wind@vip.163.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'realtek-phy-improvements'David S. Miller2017-12-031-44/+72
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Martin Blumenstingl says: ==================== Realtek Ethernet PHY driver improvements This series provides some small improvements and cleanups for the Realtek Ethernet PHY driver. None of the patches in this series should change any functionality. The goal is to make the code a bit easier to read by: - re-using the BIT and GENMASK macros (which makes it easier to compare the #defines in the kernel with the values from the datasheets) - rename a #define from a generic name to a PHY-specific name since it's only used for one specific PHY - logically group the register #defines and their register bit #defines together - indentation cleanups - removed some code duplicating for reading/writing registers on a Realtek specific "page" ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: realtek: add utility functions to read/write page addressesMartin Blumenstingl2017-12-031-30/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Realtek PHYs implement the concept of so-called "extension pages". The reason for this is probably because these PHYs expose more registers than available in the standard address range. After all read/write operations on such a page are done the driver should switch back to page 0 where the standard MII registers (such as MII_BMCR) are available. When referring to such a register the datasheets of RTL8211E and RTL8211F always specify: - the page / "ext. page" which has to be written to RTL821x_PAGE_SELECT - an address (sometimes also called reg) These new utility functions make the existing code easier to read since it removes some duplication (switching back to page 0 is done within the new helpers for example). No functional changes are intended. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: realtek: use the same indentation for all #definesMartin Blumenstingl2017-12-031-13/+14
| | | | | | | | | | | | | | | | This simply makes the code easier to read. No functional changes. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: realtek: group all register bit #defines for RTL821x_INERMartin Blumenstingl2017-12-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | This simply moves all register bit #defines which describe the (PHY specific) bits in the RTL821x_INER right below the RTL821x_INER register definition. This makes it easier to spot which registers and bits belong together. No functional changes. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: realtek: rename RTL821x_INER_INIT to RTL8211B_INER_INITMartin Blumenstingl2017-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | This macro is only used by the RTL8211B code. RTL8211E and RTL8211F both use other bits to initialize the RTL821x_INER register. No functional changes. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: realtek: use the BIT and GENMASK macrosMartin Blumenstingl2017-12-031-5/+6
|/ | | | | | | | | This makes it easier to compare the #defines with the datasheets. No functional changes. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'dsa-cross-chip-FDB-support'David S. Miller2017-12-032-20/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vivien Didelot says: ==================== net: dsa: cross-chip FDB support DSA can have interconnected switches. For instance, the ZII Dev Rev B board described in arch/arm/boot/dts/vf610-zii-dev-rev-b.dts has a switch fabric composed of 3 switch devices like this: lan4 lan6 CPU (eth1) | lan5 | lan7 | | | | | [0 1 2 3 4 6 5]---[6 0 1 2 3 4 5]---[9 0 1 2 3 4 5 6 7 8] | | | | | | | lan0 | lan2 lan3 lan8 | optical4 lan1 optical3 One current issue with DSA is cross-chip FDB. If we add a static MAC address on lan3, only its parent switch 1 (the one in the middle) will be programmed. That is not correct in a cross-chip environment, because the DSA ports connecting to switch 1 of adjacent switch 0 (on the left) and switch 2 (on the right) must be programmed too. Without this patchset, a dump of the hardware FDB of switches 0, 1 and 2 after programming a MAC address on lan3 looks like this (*): # bridge fdb add 11:22:33:44:55:66 dev lan3 # cat /sys/kernel/debug/mv88e6xxx/sw*/atu/0 | grep -v FID 0 ff:ff:ff:ff:ff:ff MC_STATIC n 0 1 2 3 4 5 6 0 11:22:33:44:55:66 MC_STATIC_MGMT_PO n 0 - - - - - - 0 ff:ff:ff:ff:ff:ff MC_STATIC n 0 1 2 3 4 5 6 0 ff:ff:ff:ff:ff:ff MC_STATIC n 0 1 2 3 4 5 6 7 8 9 With this patchset applied, adjacent DSA ports get programmed too: # bridge fdb add 11:22:33:44:55:66 dev lan3 # cat /sys/kernel/debug/mv88e6xxx/sw*/atu/0 | grep -v FID 0 11:22:33:44:55:66 MC_STATIC_MGMT_PO n - - - - - 5 - 0 ff:ff:ff:ff:ff:ff MC_STATIC n 0 1 2 3 4 5 6 0 11:22:33:44:55:66 MC_STATIC_MGMT_PO n 0 - - - - - - 0 ff:ff:ff:ff:ff:ff MC_STATIC n 0 1 2 3 4 5 6 0 11:22:33:44:55:66 MC_STATIC_MGMT_PO n - - - - - - - - - 9 0 ff:ff:ff:ff:ff:ff MC_STATIC n 0 1 2 3 4 5 6 7 8 9 In order to do that, the first commit introduces a dsa_towards_port() helper which returns the local port of a switch which must be used to reach an arbitrary switch port (local or from an adjacent switch.) The second patch uses this helper to configure the port reaching the target port for every switches of the fabric. (*) a patch for squashed debugfs interface which applies on top of this patchset is available here: https://github.com/vivien/linux/commit/f8e6ba34c68a72d3bf42f4dea79abacb2e61a3cc.patch ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: support cross-chip FDB operationsVivien Didelot2017-12-031-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | When a MAC address is added to or removed from a switch port in the fabric, the target switch must program its port and adjacent switches must program their local DSA port used to reach the target switch. For this purpose, use the dsa_towards_port() helper to identify the local switch port which must be programmed. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: introduce dsa_towards_port helperVivien Didelot2017-12-031-10/+13
|/ | | | | | | | | | | | Add a new helper returning the local port used to reach an arbitrary switch port in the fabric. Its only user at the moment is the dsa_upstream_port helper, which returns the local port reaching the dedicated CPU port, but it will be used in cross-chip FDB operations. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'dsa-simplify-switchdev-prepare-phase'David S. Miller2017-12-038-75/+93
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vivien Didelot says: ==================== net: dsa: simplify switchdev prepare phase This patch series brings no functional changes. It removes the unused switchdev_trans arguments from the dsa_switch_ops for both MDB and VLAN operations, and provides functions to prepare and add these objects for a given bitmap of ports. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: add switch mdb bitmap functionsVivien Didelot2017-12-031-15/+33
| | | | | | | | | | | | | | | | | | | | | | This patch brings no functional changes. It moves out the MDB code iterating on a multicast group into new dsa_switch_mdb_{prepare,add}_bitmap() functions. This gives us a better isolation of the two switchdev phases. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: add switch vlan bitmap functionsVivien Didelot2017-12-031-15/+34
| | | | | | | | | | | | | | | | | | | | | | This patch brings no functional changes. It moves out the VLAN code iterating on a list of VLAN members into new dsa_switch_vlan_{prepare,add}_bitmap() functions. This gives us a better isolation of the two switchdev phases. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: remove trans argument from mdb opsVivien Didelot2017-12-035-20/+12
| | | | | | | | | | | | | | | | | | | | The DSA switch MDB ops pass the switchdev_trans structure down to the drivers, but no one is using them and they aren't supposed to anyway. Remove the trans argument from MDB prepare and add operations. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: dsa: remove trans argument from vlan opsVivien Didelot2017-12-037-29/+18
|/ | | | | | | | | | | | | | | | The DSA switch VLAN ops pass the switchdev_trans structure down to the drivers, but no one is using them and they aren't supposed to anyway. Remove the trans argument from VLAN prepare and add operations. At the same time, fix the following checkpatch warning: WARNING: line over 80 characters #74: FILE: drivers/net/dsa/dsa_loop.c:177: + const struct switchdev_obj_port_vlan *vlan) Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* openvswitch: do not propagate headroom updates to internal portPaolo Abeni2017-12-031-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit 3a927bc7cf9d ("ovs: propagate per dp max headroom to all vports") the need_headroom for the internal vport is updated accordingly to the max needed headroom in its datapath. That avoids the pskb_expand_head() costs when sending/forwarding packets towards tunnel devices, at least for some scenarios. We still require such copy when using the ovs-preferred configuration for vxlan tunnels: br_int / \ tap vxlan (remote_ip:X) br_phy \ NIC where the route towards the IP 'X' is via 'br_phy'. When forwarding traffic from the tap towards the vxlan device, we will call pskb_expand_head() in vxlan_build_skb() because br-phy->needed_headroom is equal to tun->needed_headroom. With this change we avoid updating the internal vport needed_headroom, so that in the above scenario no head copy is needed, giving 5% performance improvement in UDP throughput test. As a trade-off, packets sent from the internal port towards a tunnel device will now experience the head copy overhead. The rationale is that the latter use-case is less relevant performance-wise. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Acked-by: Pravin B Shelar <pshelar@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'cpsw-ale-cleanups'David S. Miller2017-12-015-125/+98
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Grygorii Strashko says: ==================== net: ethernet: ti: cpsw/ale clean up and optimization This is set of non critical clean ups and optimizations for TI CPSW and ALE drivers. Rebased on top on net-next. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: ti: ale: fix port check in cpsw_ale_control_set/getGrygorii Strashko2017-12-011-2/+2
| | | | | | | | | | | | | | | | | | ALE ports number includes the Host port and ext Ports, and ALE ports numbering starts from 0, so correct corresponding port checks in cpsw_ale_control_set/get(). Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: ti: ale: use devm_kzalloc in cpsw_ale_create()Grygorii Strashko2017-12-014-22/+8
| | | | | | | | | | | | | | | | Use cpsw_ale_create in cpsw_ale_create(). This also makes cpsw_ale_destroy() function nop, so remove it. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: ti: ale: move static initialization in cpsw_ale_create()Grygorii Strashko2017-12-011-29/+28
| | | | | | | | | | | | | | | | | | Move static initialization from cpsw_ale_start() to cpsw_ale_create() as it does not make much sence to perform static initializtion in cpsw_ale_start() which is called everytime netif[s] is opened. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: ti: ale: optimize ale entry mask bits configuartionGrygorii Strashko2017-12-011-10/+3
| | | | | | | | | | | | | | | | | | | | The ale->params.ale_ports parameter can be used to deriver values for all ale entry mask bits: port_mask_bits, port_mask_bits, port_num_bits. Hence, calculate above values and drop all hardcoded values. For port_num_bits calcualtion use order_base_2() API. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: ti: ale: disable ale from stop()Grygorii Strashko2017-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | ALE is enabled from cpsw_ale_start() now, but disabled only from cpsw_ale_destroy() which introduces inconsitance as cpsw_ale_start() is called when netif[s] is opened, but cpsw_ale_destroy() is called when driver is removed. Hence, move ALE disabling in cpsw_ale_stop(). Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: ti: ale: use proper io apisGrygorii Strashko2017-12-011-13/+13
| | | | | | | | | | | | | | | | Switch to use writel_relaxed/readl_relaxed() IO API instead of raw version as it is recommended. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: ti: cpsw: fix ale port numbersGrygorii Strashko2017-12-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | TI OMAP/Sitara SoCs have fixed number of ALE ports 3, which includes Host port also. Hence, use fixed value instead of value calcualted from DT, which can be set by user and might not reflect actual HW configuration. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: ti: cpsw: move mac_hi/lo defines in cpsw.hGrygorii Strashko2017-12-013-8/+5
| | | | | | | | | | | | | | | | Move mac_hi/lo defines in common header cpsw.h and re-use them for netcp_ethss.c. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: ti: cpsw: move platform data struct to .c fileGrygorii Strashko2017-12-012-21/+21
| | | | | | | | | | | | | | | | CPSW platform data struct cpsw_platform_data and struct cpsw_slave_data are used only incide cpsw.c module, so move these definitions there. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: ti: cpsw: use proper io apisGrygorii Strashko2017-12-011-18/+18
| | | | | | | | | | | | | | | | Switch to use writel_relaxed/readl_relaxed() IO API instead of raw version as it is recommended. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethernet: ti: cpsw: drop unused var poll from cpsw_update_channels_resGrygorii Strashko2017-12-011-3/+0
|/ | | | | | | Drop unused variable "poll" from cpsw_update_channels_res(). Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: phy: remove generic settings for callbacks config_aneg and read_status ↵Heiner Kallweit2017-12-0128-169/+0
| | | | | | | | | | | from drivers Remove generic settings for callbacks config_aneg and read_status from drivers. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: phy: core: use genphy version of callbacks read_status and config_aneg ↵Heiner Kallweit2017-12-012-16/+22
| | | | | | | | | | | | | | | | | per default read_status and config_aneg are the only mandatory callbacks and most of the time the generic implementation is used by drivers. So make the core fall back to the generic version if a driver doesn't implement the respective callback. Also currently the core doesn't seem to verify that drivers implement the mandatory calls. If a driver doesn't do so we'd just get a NPE. With this patch this potential issue doesn't exit any longer. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'ip6_gre-add-erspan-native-tunnel-for-ipv6'David S. Miller2017-12-014-101/+398
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | William Tu says: ==================== ip6_gre: add erspan native tunnel for ipv6 The patch series add support for ERSPAN tunnel over ipv6. The first patch refectors the existing ipv4 gre implementation and the second refactors the ipv6 gre's xmit code. Finally the last patch introduces erspan protocol. change in v5: - add cover-letter description change in v4: - rebase on top of net-next - use log_ecn_error in ip6_tnl_rcv change in v3: - add inline for functions in header - rebase on top of net-next change in v2: - remove inline - fix some indent - fix errors reports by clang and scan-build ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * ip6_gre: Add ERSPAN native tunnel supportWilliam Tu2017-12-012-4/+267
| | | | | | | | | | | | | | The patch adds support for ERSPAN tunnel over ipv6. Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ip6_gre: Refactor ip6gre xmit codesWilliam Tu2017-12-011-48/+75
| | | | | | | | | | | | | | | | This patch refactors the ip6gre_xmit_{ipv4, ipv6}. It is a prep work to add the ip6erspan tunnel. Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * ip_gre: Refector the erpsan tunnel code.William Tu2017-12-012-49/+56
|/ | | | | | | | Move two erspan functions to header file, erspan.h, so ipv6 erspan implementation can use it. Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'ethtool-reset-AP'David S. Miller2017-12-013-0/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scott Branden says: ==================== net: ethtool: add support for ETH_RESET_AP Add support to reset appplication processors inside SmartNICs by defining new ETH_RESET_AP bit. And use new ETH_RESET_AP bit in bnxt ethernet driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * bnxt_en: Add ETH_RESET_AP supportScott Branden2017-12-012-0/+12
| | | | | | | | | | | | | | | | | | Add ETH_RESET_AP support handling to reset the internal Application Processor(s) of the SmartNIC card. Signed-off-by: Scott Branden <scott.branden@broadcom.com> Acked-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: ethtool: add support for reset of AP inside NIC interface.Scott Branden2017-12-011-0/+1
|/ | | | | | | | | | | | | | | | Add ETH_RESET_AP to reset the application processor(s) inside the NIC interface. Current ETH_RESET_MGMT supports a management processor inside this NIC. This is typically used for remote NIC management purposes. Application processors exist inside some SmartNICs to run various applications inside the NIC processor - be it a simple algorithm without an OS to as complex as hosting multiple VMs. Signed-off-by: Scott Branden <scott.branden@broadcom.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'rds-tcp-netns-delete-related-fixes'David S. Miller2017-12-014-32/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sowmini Varadhan says: ==================== rds-tcp netns delete related fixes Patchset contains cleanup and bug fixes. Patch 1 is the removal of some redundant code/functions. Patch 2 and 3 are fixes for corner cases identified by syzkaller. I've not been able to reproduce the actual use-after-free race flagged in the syzkaller reports, thus these fixes are based on code inspection plus manual testing to make sure the modified code paths are executed without problems in the commonly encountered timing cases. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * rds: tcp: atomically purge entries from rds_tcp_conn_list during netns deleteSowmini Varadhan2017-12-012-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rds_tcp_kill_sock() function parses the rds_tcp_conn_list to find the rds_connection entries marked for deletion as part of the netns deletion under the protection of the rds_tcp_conn_lock. Since the rds_tcp_conn_list tracks rds_tcp_connections (which have a 1:1 mapping with rds_conn_path), multiple tc entries in the rds_tcp_conn_list will map to a single rds_connection, and will be deleted as part of the rds_conn_destroy() operation that is done outside the rds_tcp_conn_lock. The rds_tcp_conn_list traversal done under the protection of rds_tcp_conn_lock should not leave any doomed tc entries in the list after the rds_tcp_conn_lock is released, else another concurrently executiong netns delete (for a differnt netns) thread may trip on these entries. Reported-by: syzbot <syzkaller@googlegroups.com> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>