aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2016-02-25tipc: fix null deref crash in compat config pathFlorian Westphal1-0/+1
msg.dst_sk needs to be set up with a valid socket because some callbacks later derive the netns from it. Fixes: 263ea09084d172d ("Revert "genl: Add genlmsg_new_unicast() for unicast message allocation") Reported-by: Jon Maloy <maloy@donjonn.com> Bisected-by: Jon Maloy <maloy@donjonn.com> Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25tipc: fix crash during node removalJon Paul Maloy1-13/+11
When the TIPC module is unloaded, we have identified a race condition that allows a node reference counter to go to zero and the node instance being freed before the node timer is finished with accessing it. This leads to occasional crashes, especially in multi-namespace environments. The scenario goes as follows: CPU0:(node_stop) CPU1:(node_timeout) // ref == 2 1: if(!mod_timer()) 2: if (del_timer()) 3: tipc_node_put() // ref -> 1 4: tipc_node_put() // ref -> 0 5: kfree_rcu(node); 6: tipc_node_get(node) 7: // BOOM! We now clean up this functionality as follows: 1) We remove the node pointer from the node lookup table before we attempt deactivating the timer. This way, we reduce the risk that tipc_node_find() may obtain a valid pointer to an instance marked for deletion; a harmless but undesirable situation. 2) We use del_timer_sync() instead of del_timer() to safely deactivate the node timer without any risk that it might be reactivated by the timeout handler. There is no risk of deadlock here, since the two functions never touch the same spinlocks. 3: We remove a pointless tipc_node_get() + tipc_node_put() from the timeout handler. Reported-by: Zhijiang Hu <huzhijiang@gmail.com> Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25tipc: eliminate risk of finding to-be-deleted node instanceJon Paul Maloy1-9/+9
Although we have never seen it happen, we have identified the following problematic scenario when nodes are stopped and deleted: CPU0: CPU1: tipc_node_xxx() //ref == 1 tipc_node_put() //ref -> 0 tipc_node_find() // node still in table tipc_node_delete() list_del_rcu(n. list) tipc_node_get() //ref -> 1, bad kfree_rcu() tipc_node_put() //ref to 0 again. kfree_rcu() // BOOM! We fix this by introducing use of the conditional kref_get_if_not_zero() instead of kref_get() in the function tipc_node_find(). This eliminates any risk of post-mortem access. Reported-by: Zhijiang Hu <huzhijiang@gmail.com> Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25qed, qede: rebrand module descriptionYuval Mintz2-6/+6
Drop the `QL4xxx 40G/100G' and use `FastLinQ 4xxxx' instead. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25qed: Prevent probe on previous errorYuval Mintz1-0/+11
Don't allow driver to probe on an adapter at a failed state; Gracefully block the probe instead. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25qed: add MODULE_FIRMWARE()Yuval Mintz1-0/+2
Module is using a binary firmware file and so should be marked as such. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25qede: Don't report link change needlesslyYuval Mintz1-6/+10
There are several corner cases where driver might get a 2nd notification about the same link change. Don't log any additional changes if the physical carrier is already reported as it should. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25qede: Linearize SKBs when neededYuval Mintz1-5/+33
There's a corner-case in HW where an SKB queued for transmission that contains too many frags will cause FW to assert. This patch solves this by linearizing the SKB if necessary. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25qede: Change pci DID for 10g deviceYuval Mintz1-1/+1
The device ID for the 10g module has changed. Populate the pci_ids table accordingly. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25netxen: Use kobj_to_dev()Amitoj Kaur Chawla1-5/+5
Introduce the use of kobj_to_dev() helper function instead of open coding it with container_of() The Coccinelle semantic patch used to make this change is as follows: //<smpl> @@ expression a; symbol kobj; @@ - container_of(a, struct device, kobj) + kobj_to_dev(a) //</smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-253c59x: Use setup_timer()Amitoj Kaur Chawla1-8/+2
Convert a call to init_timer and accompanying intializations of the timer's data and function fields to a call to setup_timer. The Coccinelle semantic patch that fixes this problem is as follows: // <smpl> @@ expression t,f,d; @@ -init_timer(&t); +setup_timer(&t,f,d); ... -t.data = d; -t.function = f; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25forcedeth: Use setup_timer()Amitoj Kaur Chawla1-6/+2
Convert a call to init_timer and accompanying intializations of the timer's data and function fields to a call to setup_timer. The Coccinelle semantic patch that fixes this problem is as follows: // <smpl> @@ expression t,f,d; @@ -init_timer(&t); +setup_timer(&t,f,d); -t.data = d; -t.function = f; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25net: tulip: Use setup_timer()Amitoj Kaur Chawla1-9/+5
Convert a call to init_timer and accompanying intializations of the timer's data and function fields to a call to setup_timer. The Coccinelle semantic patch that fixes this problem is as follows: // <smpl> @@ expression t,f,d; @@ -init_timer(&t); +setup_timer(&t,f,d); -t.data = d; -t.function = f; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25gianfar: fix endianness for hardware timestampYangbo Lu1-2/+2
Fix endianness for the 64-bit hardware timestamp value with be64_to_cpu to support both PowerPC platforms and ARM platforms. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25gianfar_ptp: replace get_of_u32 with of_property_read_u32Yangbo Lu1-20/+13
Replace get_of_u32 with standard helper function of_property_read_u32 since the latter can process cpu endianness. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25ARM: dts: ls1021a: add 1588 timer nodeYangbo Lu1-0/+12
Add the 1588 timer node for ls1021a platform to support gianfar ptp driver. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25phy: marvell: Fix 88E1510 initializationClemens Gruber1-35/+35
A bug was introduced in the merge commit b633353115e3 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net") The generic marvell_config_init (and therefore marvell_of_reg_init) is not called anymore for the Marvell 88E1510 (in net-next). This patch calls marvell_config_init and moves the specific init function for the 88E1510 below the marvell_config_init function to avoid adding a function predeclaration. Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25net: dsa: drop vlan_getnextVivien Didelot3-46/+1
The VLAN GetNext operation is specific to some switches, and thus can be complicated to implement for some drivers. Remove the support for the vlan_getnext/port_pvid_get approach in favor of the generic and simpler port_vlan_dump function. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25net: dsa: mv88e6xxx: implement port_vlan_dumpVivien Didelot4-66/+56
Remove the port_pvid_get and vlan_getnext functions in favor of a simpler mv88e6xxx_port_vlan_dump function. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25net: dsa: add port_vlan_dump routineVivien Didelot3-0/+10
Similar to port_fdb_dump, add a port_vlan_dump function to DSA drivers which gets passed the switchdev VLAN object and callback. This function, if implemented, takes precedence over the soon legacy vlan_getnext/port_pvid_get approach. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25vxlan: simplify metadata_dst usage in vxlan_rcvJiri Benc1-12/+7
Now when the packet is scrubbed early, the metadata_dst can be assigned to the skb as soon as it is allocated. This simplifies the error cleanup path, as the dst will be freed by kfree_skb. It is also not necessary to pass it as a parameter to functions anymore. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25vxlan: consolidate rx handling to a single functionJiri Benc1-44/+28
Now when both vxlan_udp_encap_recv and vxlan_rcv are much shorter, combine them into a single function. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25vxlan: move ECN decapsulation to a separate functionJiri Benc1-31/+31
It simplifies the vxlan_rcv function. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25vxlan: move inner L2 header processing to a separate functionJiri Benc1-16/+33
This code will be different for VXLAN-GPE, so move it to a separate function. It will also make the rx path less spaghetti-like. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25vxlan: consolidate GBP handling even moreJiri Benc1-4/+5
Now when the packet is scrubbed early, skb->mark can be set in the GBP handling code. Signed-off-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25net_sched: add network namespace support for tc actionsWANG Cong14-149/+746
Currently tc actions are stored in a per-module hashtable, therefore are visible to all network namespaces. This is probably the last part of the tc subsystem which is not aware of netns now. This patch makes them per-netns, several tc action API's need to be adjusted for this. The tc action API code is ugly due to historical reasons, we need to refactor that code in the future. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-25net_sched: prepare tcf_hashinfo_destroy() for netns supportWANG Cong2-8/+29
We only release the memory of the hashtable itself, not its entries inside. This is not a problem yet since we only call it in module release path, and module is refcount'ed by actions. This would be a problem after we move the per module hinfo into per netns in the latter patch. Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24ppp: clarify parsing of user supplied data in ppp_set_compress()Guillaume Nault1-5/+7
* Split big conditional statement. * Check (data.length <= CCP_MAX_OPTION_LENGTH) only once. * Don't read ccp_option[1] if not initialised. Reading uninitialised ccp_option[1] was harmless, because this could only happen when data.length was 0 or 1. So even then, we couldn't pass the (ccp_option[1] < 2 || ccp_option[1] > data.length) test anyway. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24bnx2x: add a separate GENEVE Kconfig symbolArnd Bergmann2-7/+17
When CONFIG_GENEVE is built as a loadable module, and bnx2x is built-in, we get this link error: drivers/net/built-in.o: In function `bnx2x_open': :(.text+0x33322): undefined reference to `geneve_get_rx_port' drivers/net/built-in.o: In function `bnx2x_sp_rtnl_task': :(.text+0x3e632): undefined reference to `geneve_get_rx_port' This avoids the problem by adding a separate Kconfig symbol named CONFIG_BNX2X_GENEVE that is only enabled when the code is reachable from the driver. This is the same trick that BNX2X does for VXLAN support, and is similar to how I40E handles both. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 883ce97d25b0 ("bnx2x: Add Geneve inner-RSS support") Acked-By: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24gianfar: Remove redundant ops for do_tstamp from xmit()Claudiu Manoil1-9/+5
Timestamp BD status updates that can be merged into the same "do_tstamp" block, no need for extra save/restore to the BD area. The code is more readable too. Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24gianfar: Use skb_frag_t pointers inside xmit()Claudiu Manoil1-9/+9
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24gianfar: Map head TxBD firstClaudiu Manoil1-48/+48
Move the mapping of the head BD before the mapping of fragments. The TOE (h/w offload) decision logic block can be also moved up (as the TOE flag belongs to the head BD), resulting in more localized code (TOE logic vs BD mapping code blocks). Note that, for this h/w, the R (status) bit for the head BD of a S/G frame needs to be written last for a reliable transmission. For the fragmented skb case, a local variable is used to temporarily store the status info of the first BD, replacing a BD status read. A merge of 2 "if(do_tstamp)" blocks was also possible. Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24bgmac: support Ethernet device on BCM47094 SoCRafał Miłecki1-2/+4
It needs very similar workarounds to the one on BCM4707. It was tested on D-Link DIR-885L home router. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24be2net: Fix a UE caused by passing large frames to the ASICajit.khaparde@broadcom.com2-1/+13
In QnQ configurations like Flex-10 where the VLANs are inserted by the ASIC, on rare occasions the HW is encountering a scenario where the final frame length ends to be greater than what the ASIC can support. This is because when the TXULP pulls the TX WRB to check the length of the frame to be transmitted it also adds the size of VLANs to be inserted by the HW to the length of the frame indicated in the WRB, which in some cases fails the range check. This causes a UE. Avoid this by trimming the skb length to accommodate the VLAN insertion. Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24be2net: Declare some u16 fields as u32 to improve performanceajit.khaparde@broadcom.com3-17/+19
When 16-bit integers are loaded on CPUs with high order native register sizes, the CPU could use some extra ops before using them. And currently some of the frequently used fields in the driver like the producer and consumer indices of the queues are declared as u16. This patch declares such fields as u32. With this change we see the 64-byte packets per second numbers improve by about 4%. Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24eth: Pull header from first fragment via eth_get_headlenAlexander Duyck1-1/+2
We want to try and pull the L4 header in if it is available in the first fragment. As such add the flag to indicate we want to pull the headers on the first fragment in. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24flow_dissector: Use same pointer for IPv4 and IPv6 addressesAlexander Duyck1-6/+5
The IPv6 parsing was using a local pointer when it could use the same pointer as the IPv4 portion of the code since the key_addrs can support both IPv4 and IPv6 as it is just a pointer. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24flow_dissector: Correctly handle parsing FCoEAlexander Duyck1-2/+5
The flow dissector bits handling FCoE didn't bother to actually validate that the space there was enough for the FCoE header. So we need to update things so that if there is room we add the header and report a good result, otherwise we do not add the header, and report the bad result. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24flow_dissector: Fix fragment handling for header length computationAlexander Duyck1-3/+7
It turns out that for IPv4 we were reporting the ip_proto of the fragment, and for IPv6 we were not. This patch updates that behavior so that we always report the IP protocol of the fragment. In addition it takes the steps of updating the payload offset code so that we will determine the start of the payload not including the L4 header for any fragment after the first. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24flow_dissector: Check for IP fragmentation even if not using IPv4 addressAlexander Duyck1-8/+9
This patch corrects the logic for the IPv4 parsing so that it is consistent with how we handle IPv6. Specifically if we do not have the flow key indicating we want the addresses we still may need to take a look at the IP fragmentation bits and to see if we should stop after we have recognized the L3 header. Fixes: 807e165dc44f ("flow_dissector: Add control/reporting of fragmentation") Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24net/mlx5e: Add TX inner packet countersMatthew Finlay3-12/+32
Add TSO and TX checksum counters for tunneled, inner packets Signed-off-by: Matthew Finlay <matt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24net/mlx5e: Add TX stateless offloads for tunnelingMatthew Finlay1-6/+16
Add support for TSO and TX checksum when using hw assisted, tunneled offloads. Signed-off-by: Matthew Finlay <matt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24net/mlx5e: Add netdev support for VXLAN tunnelingMatthew Finlay6-3/+332
If a VXLAN udp dport is added to device it will: - Configure the hardware to offload the port (up to the max supported). - Advertise NETIF_F_GSO_UDP_TUNNEL and supported hw_enc_features. Signed-off-by: Matthew Finlay <matt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24net/mlx5e: Protect en header file from redefinitionsMatthew Finlay1-1/+5
add ifndef to en.h. needed for upcoming vxlan patchset. Signed-off-by: Matthew Finlay <matt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24net/mlx5e: Move to checksum completeMatthew Finlay1-4/+5
Use checksum complete for all IP packets, unless they are HW LRO, in which case, use checksum unnecessary. Signed-off-by: Matthew Finlay <matt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24net/mlx5e: Wake On LAN supportTariq Toukan6-1/+243
Implement set/get WOL by ethtool and added the needed device commands and structures to mlx5_ifc. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Rana Shahout <ranas@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24net/mlx5e: Implement DCBNL IEEE max rateTariq Toukan4-0/+150
Add support for DCBNL IEEE get/set max rate. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24net/mlx5e: Support DCBNL IEEE PFCAchiad Shochat1-0/+39
Implement the set/get DCBNL IEEE PFC callbacks. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24net/mlx5e: Support DCBNL IEEE ETSSaeed Mahameed6-15/+317
Support the ndo_setup_tc callback and the needed methods for multi TC/UP support, and removed the default_vlan_prio from mlx5e_priv which is always 0, it was replaced with hardcoded "0" in the new select queue method. For that we now create MAX_NUM_TC num of TISs (one per prio) on netdevice creation instead of priv->params.num_tc which was always 1. So far each channel had a single TXQ, Now each channel has a TXQ per TC (Traffic Class). Added en_dcbnl.c which implements the set/get DCBNL IEEE ETS, set/get dcbx and registers the mlx5e dcbnl ops. We still use the kernel's default TXQ selection method to select the channel to transmit through but now we use our own method to select the TXQ inside the channel based on VLAN priority. In mlx5, as opposed to mlx4, tc group N gets lower priority than tc group N+1. CC: John Fastabend <john.fastabend@gmail.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Rana Shahout <ranas@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-24net/mlx5: Introduce physical port TC/prio access functionsSaeed Mahameed4-1/+132
Add access functions to set and query a physical port TC groups and prio parameters. Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>