summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2016-06-16sfc: Fix dup unknown multicast/unicast filters after datapath resetAndrew Rybchenko
Filter match flags are not unique criteria to be mapped to priority because of both unknown unicast and unknown multicast are mapped to LOC_MAC_IG. So, local MAC is required to map filter to priority. MCDI filter flags is unique criteria to find filter priority. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16sfc: Refactor checks for invalid filter IDEdward Cree
Nearly every time we call efx_ef10_filter_remove_unsafe, we first check for EFX_EF10_FILTER_ID_INVALID, in which case we do nothing. So move that check into the function, simplifying all the call sites. Also, change the return type to void, since none of the callers check it. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16sfc: Take mac_lock before calling efx_ef10_filter_table_probeMartin Habets
When trying to enslave an SFC interface to a bond the following BUG_ON was hit: kernel BUG [in ef10.c]! CPU: 0 PID: 4383 Comm: ifenslave Tainted: G ... Call Trace: efx_ef10_filter_add_vlan+0x121/0x180 [sfc] efx_ef10_filter_table_probe+0x2a2/0x4f0 [sfc] efx_ef10_set_mac_address+0x370/0x6d0 [sfc] efx_set_mac_address+0x7d/0x120 [sfc] dev_set_mac_address+0x43/0xa0 bond_enslave+0x337/0xea0 [bonding] This comes from function efx_ef10_filter_vlan_sync_rx_mode. To solve the bug we ensure the mac_lock is taken before calling efx_ef10_filter_add_vlan. But to avoid a priority inversion mac_lock must be taken before filter_sem. To satisfy these requirements we end up taking mac_lock in efx_ef10_vport_set_mac_address, efx_ef10_set_mac_address, efx_ef10_sriov_set_vf_vlan and efx_probe_filters. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16sfc: Implement ndo_vlan_rx_{add, kill}_vid() callbacksAndrew Rybchenko
Supports HW VLAN filtering, en/disabled using ethtool. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16sfc: Implement list of VLANs added over interfaceAndrew Rybchenko
Right now it contains dummy VLAN entry with unspecified VID only. The entry is used for the case when HW VLAN filtering is not used. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16sfc: Make EF10 filter management helper functions VLAN-awareAndrew Rybchenko
It is a step to support VLAN filtering in HW. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16sfc: Store unicast and multicast promisc flag with address cacheAndrew Rybchenko
These flags are built when address cache is updated. The information will be required when VLAN filtering is added and address cache is used without re-sync. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16sfc: Move filter IDs to per-VLAN data structureAndrew Rybchenko
It is a step to support VLAN filtering in HW. Until then, there is only one struct efx_ef10_filter_vlan per struct efx_ef10_filter_table, with no VLAN information yet. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16sfc: Forget filter ID when the filter is marked oldAndrew Rybchenko
It is required to remove setting of filter IDs to invalid from multicast and unicast addresses caching functions. Add initialization to invalid when filter table is created. Add paranoid checks to track consistency. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16sfc: Assert filter_sem write locked when requiredEdward Cree
Based on a patch by Andrew Rybchenko <Andrew.Rybchenko@oktetlabs.ru> Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16sfc: Add efx_nic member with fixed netdev featuresAndrew Rybchenko
It allows to change set of fixed features on datapath reset. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16sfc: Move last mc_promisc flag to EF10 filter table stateAndrew Rybchenko
It is used for EF10 only and logically belongs to EF10 filter table state. It is OK that it is reset to false on filter table recreation since all filters are removed on destruction. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16sfc: Define macro with EF10 offload featureAndrew Rybchenko
It is useful to simplify features addition. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16liquidio: Introduce new octeon2/3 headerRaghu Vatsavayi
Added support for new instruction header for octeon2/octeon3(ih) and corresponding changes. Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16liquidio: Replace ifidx for FW commandsRaghu Vatsavayi
This patch decoupled the firmware side ifidx and host side interface number. It also has some minor name change for linkinfo sturct field. Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16liquidio: New driver FW command structureRaghu Vatsavayi
This patch is for new driver/firmware control command structure (octnic_packet_params and octnic_cmd_setup ) and resultant code changes. Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16liquidio: Consider PTP for packet size calculationsRaghu Vatsavayi
This patch is to refactor packet size calculations to support PTP enabled for 66xx and 68xx cards and also other cards that do not support PTP. Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16liquidio: RX desc alloc changesRaghu Vatsavayi
This patch is to add page based buffers for receive side descriptors of the driver and separate free routines for rx and tx buffers. Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16liquidio:RX queue alloc changesRaghu Vatsavayi
This patch is to allocate rx queue's memory based on numa node and also use page based buffers for rx traffic improvements. Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16liquidio:Scatter gather list per IQRaghu Vatsavayi
This patch is to allocate and manage scatter gather lists per input queue(iq's) and remove queue's interdependence. Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16liquidio: Host queue mapping changesRaghu Vatsavayi
This patch is to allocate the input queues based on Numa node in tx path and queue mapping changes based on the mapping info provided by firmware. Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16liquidio: Avoid double free during soft commandRaghu Vatsavayi
This patch is to resolve the double free issue by checking proper return values from soft command. Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com> Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com> Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com> Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16net: vrf: Switch dst dev to loopback on device deleteDavid Ahern
Attempting to delete a VRF device with a socket bound to it can stall: unregister_netdevice: waiting for red to become free. Usage count = 1 The unregister is waiting for the dst to be released and with it references to the vrf device. Similar to dst_ifdown switch the dst dev to loopback on delete for all of the dst's for the vrf device and release the references to the vrf device. Fixes: 193125dbd8eb2 ("net: Introduce VRF device driver") Fixes: 35402e3136634 ("net: Add IPv6 support to VRF device") Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-16mdio: mux: avoid 'maybe-uninitialized' warningArnd Bergmann
The latest changes to the MDIO code introduced a false-positive warning with gcc-6 (possibly others): drivers/net/phy/mdio-mux.c: In function 'mdio_mux_init': drivers/net/phy/mdio-mux.c:188:3: error: 'parent_bus_node' may be used uninitialized in this function [-Werror=maybe-uninitialized] It's easy to avoid the warning by making sure the parent_bus_node is initialized in both cases at the start of the function, since the later 'of_node_put()' call is also valid for a NULL pointer argument. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: f20e6657a875 ("mdio: mux: Enhanced MDIO mux framework for integrated multiplexers") Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15cxgb4/cxgb4vf: Synchronize all MAC addressesHariprasad Shenai
Even if interface is in Promiscuous mode/Allmulti mode synchronize MAC addresses. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15cxgb4: Enable SR-IOV configuration via PCI sysfs interfaceHariprasad Shenai
Implement callback in the driver for the new PCI bus driver interface that allows the user to enable/disable SR-IOV virtual functions in a device via the sysfs interface. Deprecate module parameter used to configure SRIOV Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15cxgb4: Force cxgb4 driver as MASTER in kdump kernelHariprasad Shenai
When is_kdump_kernel() is true, Forcing cxgb4 driver as Master so we can reinitialize the Firmware/Chip. Also reduce memory usage by disabling offload. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15net: vrf: Update flags and features settingsDavid Ahern
1. Default VRF devices to not having a qdisc (IFF_NO_QUEUE). Users can add one as desired. 2. Disable adding a VLAN to a VRF device. 3. Enable offloads and hardware features similar to other logical devices (e.g., dummy, veth) Change provides a significant boost in TCP stream Tx performance, from ~2,700 Mbps to ~18,100 Mbps and makes throughput close to the performance without a VRF (18,500 Mbps). netperf TCP_STREAM benchmark using qemu with virtio+vhost for the NICs Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15tun: fix csum generation for tap devicesPaolo Abeni
The commit 34166093639b ("tuntap: 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: 34166093639 ("tuntap: use common code for virtio_net_hdr and skb GSO conversion") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15net: vrf: Handle ipv6 multicast and link-local addressesDavid Ahern
IPv6 multicast and link-local addresses require special handling by the VRF driver: 1. Rather than using the VRF device index and full FIB lookups, packets to/from these addresses should use direct FIB lookups based on the VRF device table. 2. fail sends/receives on a VRF device to/from a multicast address (e.g, make ping6 ff02::1%<vrf> fail) 3. move the setting of the flow oif to the first dst lookup and revert the change in icmpv6_echo_reply made in ca254490c8dfd ("net: Add VRF support to IPv6 stack"). Linklocal/mcast addresses require use of the skb->dev. With this change connections into and out of a VRF enslaved device work for multicast and link-local addresses work (icmp, tcp, and udp) e.g., 1. packets into VM with VRF config: ping6 -c3 fe80::e0:f9ff:fe1c:b974%br1 ping6 -c3 ff02::1%br1 ssh -6 fe80::e0:f9ff:fe1c:b974%br1 2. packets going out a VRF enslaved device: ping6 -c3 fe80::18f8:83ff:fe4b:7a2e%eth1 ping6 -c3 ff02::1%eth1 ssh -6 root@fe80::18f8:83ff:fe4b:7a2e%eth1 Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15net: l3mdev: Remove const from flowi6 arg to get_rt6_dstDavid Ahern
Allow drivers to pass flow arg to functions where the arg is not const and allow the driver to make updates as needed (eg., setting oif). Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15net: cx89x0: Add DT supportAlexander Shiyan
Add DT support to the Cirrus Logic CS89x0 driver. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15net: hns: update the dependencyKejian Yan
After the patchset about adding support of ACPI (commit id is 6343488) being applied, HNS does not depend on OF. It depends on OF or ACPI, so the Kconfig file needs to be updated. Signed-off-by: Kejian Yan <yankejian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15r8152: save the speedhayeswang
The user may change the speed. Use it to replace the default one. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15r8152: move the setting for the default speedhayeswang
Move calling set_speed() from open() to rtl_hw_phy_work_func_t(). Then, we would set the default speed only for first initialization or after resuming. Besides, the set_speed() could handle the flag of PHY_RESET which would be set in rtl_ops.hw_phy_cfg(). Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-15r8152: move the settings of PHY to a work queuehayeswang
Move the settings of PHY to a work queue and schedule it after rtl_ops.init(). There are some reasons for this. First, the settings are only needed for the first time initialization or after the power down occurs. Second, the settings are independent with the others. Last, the settings may take more time than the others. Leave they in probe() or open() may delay the following flows. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-14bnxt_en: Support new ETHTOOL_{G|S}LINKSETTINGS API.Michael Chan
To fully support 25G and 50G link settings. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-14bnxt_en: Don't allow autoneg on cards that don't support it.Michael Chan
Some cards do not support autoneg. The current code does not prevent the user from enabling autoneg with ethtool on such cards, causing confusion. Firmware provides the autoneg capability information and we just need to store it in the support_auto_speeds field in bnxt_link_info struct. The ethtool set_settings() call will check this field before proceeding with autoneg. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-14bnxt_en: Add BCM5731X and BCM5741X device IDs.Michael Chan
Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-14bnxt_en: Add GRO logic for BCM5731X chips.Michael Chan
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>
2016-06-14bnxt_en: Refactor bnxt_gro_skb().Michael Chan
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>
2016-06-14bnxt_en: Define the supported chip numbers.Michael Chan
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>
2016-06-14bnxt_en: Add PCI device ID for 57404 NPAR devices.Michael Chan
Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-14bnxt_en: Enable NPAR (NIC Partitioning) Support.Satish Baddipadige
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>
2016-06-14bnxt_en: Handle VF_CFG_CHANGE event from firmware.Michael Chan
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>
2016-06-14bnxt_en: Add new function bnxt_reset().Michael Chan
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>
2016-06-14bnxt_en: Add function for VF driver to query default VLAN.Michael Chan
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>
2016-06-14net: ethernet: enic: move to new ethtool api {get|set}_link_ksettingsPhilippe Reynes
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>
2016-06-14virtio_net: fix csum generation for virtio-net devicesMike Rapoport
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>
2016-06-13net: fec: handle small PHY reset durations more preciselyStefan Wahren
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>