summaryrefslogtreecommitdiffstats
path: root/drivers/net
Commit message (Collapse)AuthorAgeFilesLines
* liquidio: MTU limitsRaghu Vatsavayi2016-07-053-11/+15
| | | | | | | | | | This patch limits the MTU between 68 bytes and 16000 bytes. 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>
* liquidio: free resources during shutdownRaghu Vatsavayi2016-07-054-8/+13
| | | | | | | | | | | | This patch fixes the issue of proper freeing of queue memory resources during free device. It also has fix for correct pcie error reporting. 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>
* liquidio: iq/oq limitsRaghu Vatsavayi2016-07-051-5/+1Star
| | | | | | | | | | | This patch removes the dependency of number of iq/oq's on number of cpus. 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>
* liquidio: softcommand delayRaghu Vatsavayi2016-07-053-5/+5
| | | | | | | | | | | This patch updates the delay constant for softcommands in accrodance with new requirements. 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>
* liquidio: IQ synchronizationRaghu Vatsavayi2016-07-051-11/+16
| | | | | | | | | | | | This patch tries to protect against bh preemption with sc_buf_pool. It also modifies the syncronization primitives during input queue processing. 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>
* liquidio: Macro replacementsRaghu Vatsavayi2016-07-0517-321/+66Star
| | | | | | | | | | | This patch has minor replacements of ACCESS_ONCE macros with WRITE_ONCE and replacement of BUG_ON with polite version WARN_ON. 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>
* liquidio: Vxlan supportRaghu Vatsavayi2016-07-056-5/+254
| | | | | | | | | | This patch adds support for Vxaln offloads in liquidio driver. 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>
* net: ethernet: bcmgenet: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-07-051-26/+2Star
| | | | | | | | There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: bcmgenet: use phydev from struct net_devicePhilippe Reynes2016-07-053-39/+31Star
| | | | | | | | | | The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: arc: emac: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-07-051-38/+2Star
| | | | | | | | There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: arc: emac: use phydev from struct net_devicePhilippe Reynes2016-07-052-18/+12Star
| | | | | | | | | | The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: ixp4xx_eth: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-07-051-12/+2Star
| | | | | | | | There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: ixp4xx_eth: use phydev from struct net_devicePhilippe Reynes2016-07-051-20/+16Star
| | | | | | | | | | The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: smsc: smsc911x: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-07-051-16/+2Star
| | | | | | | | There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: smsc: smsc911x: use phydev from struct net_devicePhilippe Reynes2016-07-051-35/+31Star
| | | | | | | | | | The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: lantiq_etop: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-07-051-14/+2Star
| | | | | | | | There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: lantiq_etop: use phydev from struct net_devicePhilippe Reynes2016-07-051-17/+7Star
| | | | | | | | | | The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: cavium: octeon: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-07-051-23/+2Star
| | | | | | | | There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: cavium: octeon: use phydev from struct net_devicePhilippe Reynes2016-07-051-46/+40Star
| | | | | | | | | | The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/mlx4: Fix some indent inconsistancyChristophe Jaillet2016-07-055-19/+17Star
| | | | | | | | | | | Silent a few smatch warnings about indentation. This include the removal of a 'return' statement in 'resource_tracker.c'. This 'return' will still be performed when breaking out of the corresponding 'switch' block. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net-next: mediatek: fix compile error inside mtk_poll_controller()John Crispin2016-07-021-1/+1
| | | | | | | | | | commit 8067302973a1 ("net-next: mediatek: add support for IRQ grouping") failed to properly update the irq handling inside mtk_poll_controller() causing compile errors if netconsole was enabled. Fix this by updating the code to use the new separated irq handler function for RX. Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum: Add traps needed for router implementationJiri Pirko2016-07-022-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | ip2me: To instruct HW to send trapped ip2me traffic to kernel, we have to add this trap. Selection ip2me traffic is introduced later on in this set. ARPs: We are going to stop flooding to CPU port when netdev isn't bridged and only get packets destined to the netdev's IP address and certain control packets. Add traps for ARP request (broadcast) and response (unicast) in order to get these to the CPU and resolve neighbours. host miss: If a packet is routed through a directly connected route and its destination IP is not in the device's neighbour table, then we need to trap it to CPU. This will cause the host to resolve the MAC of the neighbour, which will be eventually programmed to the device's table. router ingress: In order to trap packets in router part. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum: Use action 'discard' when removing trapsIdo Schimmel2016-07-021-2/+2
| | | | | | | | | | | | | | When removing packet traps we should use action 'discard' instead of 'forward', as some trap IDs we'll add cannot be configured with the later. However, result is the same, as packets are not trapped to the CPU. In the future we will be able to reverse the operation properly by detaching the trap group from the CPU. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: reg: Add Router Interface Table RegisterIdo Schimmel2016-07-021-0/+194
| | | | | | | | | Add the Router Interface Table Register (RITR), which allows us to create and configure router interfaces (RIFs). Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: reg: Add FDB action to forward to routerIdo Schimmel2016-07-021-1/+3
| | | | | | | | | | | Incoming packets are directed to the router when they match an FDB entry with action forward to IP router. Add this action, which was mistakenly named "TRAP". Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum: Add router interface structIdo Schimmel2016-07-022-0/+22
| | | | | | | | | | | | | | | | | | When enabling the router in the device we will represent L3 netdevs using router interfaces (RIFs). These will be specified whenever programming routes or neighbours on the netdev. Introduce the basic RIF infrastructure which allows one to lookup a RIF by its netdev. Later patches in the series will extend this, but the basic routines are needed now in order to direct traffic to CPU. Pointers to the RIF structs are stored in an array indexed by the RIF's number. This will allow us to efficiently update the kernel's neighbour table when regularly dumping the device's table. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum_router: Add basic ipv4 router initializationIdo Schimmel2016-07-024-1/+83
| | | | | | | | Create a skeleton router file and do basic HW initialization of router. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum: Initialize ports at the end of init sequenceIdo Schimmel2016-07-021-14/+11Star
| | | | | | | | | | | | | | | | | | | During ports initialization a net device is registered for each available port, which implies the port is usable. However, a port is only usable after the different parts of the device (e.g. flooding, buffers) are initialized. This is especially important now, when we must initialize the router before the ports, as otherwise the device can't be initialized. Solve that by initializing the switch ports at the end of init sequence. Also, remove an unnecessary warning about port up/down events, which would otherwise be invoked whenever removing the driver, as ports are removed before unregistering the listener for these events. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: reg: Add Router General Configuration RegisterIdo Schimmel2016-07-021-1/+77
| | | | | | | | | Add the Router General Configuration Register (RGCR), which allows us to enable the router in the device and configure its various parameters. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum: Remove RIF from PVID vPort when joining / leaving LAGIdo Schimmel2016-07-021-0/+13
| | | | | | | | | | | | | | | | | | | | We are going to assign router interfaces (RIFs) to netdevs if an IPv4 address was assigned to them. If one was assigned to a port netdev, this will translate to the PVID vPort being member in a RIF. While it's possible for a LAG slave to have an IP address, we can't have a vPort being member in two FIDs (assuming the LAG device will be put in bridge / assigned an IP address). Solve that by making the PVID vPort leave any FID it might be a member in when joining / leaving LAG. Note that the PVID vPort is the only vPort that can be present on the port when it's put under LAG. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum: Sync PVID vPort LAG statusIdo Schimmel2016-07-021-0/+31
| | | | | | | | | | | | | | | | When VLAN devices are created on top of LAG, their underlying vPorts are configured correctly with LAG membership. However, the PVID vPort is implicit and already present when the port netdev is put under LAG, so its LAG membership is never set. Set it correctly when joining / leaving LAG. This didn't matter until now, but we are going to introduce support for router interfaces (RIFs), which need to take into account LAG membership. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum: Remove VLANs configuration via SELF flagIdo Schimmel2016-07-023-66/+6Star
| | | | | | | | | | | | | | | | | When port isn't bridged it is still possible to invoke switchdev ops and configure the device's VLAN filters. However, this will require us to use different Router InterFaces (RIFs) for the same netdev, instead of one per-netdev as with any other configuration. Taking the above into account and the fact that this functionality is questionable with regards to the device's normal use-case, remove it and instead return an error. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlxsw: spectrum: Send untagged packets through a port netdevIdo Schimmel2016-07-021-1/+2
| | | | | | | | | | | | | | | | | Port netdevs (e.g. swXpY) that are not bridged are represented in the device using a vPort with VID=PVID=1 (the PVID vPort), as untagged packets entering the switch are internally tagged with the PVID VLAN. When these packets are routed through a different port netdev they should egress untagged. This wasn't a problem until now, as non-bridged traffic only originated from the CPU, which transmits packets out of the port as-is. When a vPort is created with VID 1 mark it as egress untagged. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Allow statistics DMA to be configurable using ethtool -C.Michael Chan2016-07-023-3/+31
| | | | | | | | The allowable range is 0.25 seconds to 1 second interval. Default is 1 second. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Assign netdev->dev_port with port ID.Michael Chan2016-07-021-0/+1
| | | | | | | This is useful for multi-function devices. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Allow promiscuous mode for VF if default VLAN is enabled.Michael Chan2016-07-021-3/+12
| | | | | | | | With a default VLAN, the VF has its own VLAN domain and it can receive all traffic within that domain. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Increase maximum supported MTU to 9500.Vasundhara Volam2016-07-021-1/+1
| | | | | | Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Enable MRU enables bit when configuring VNIC MRU.Michael Chan2016-07-021-1/+2
| | | | | | | | For correctness, the MRU enables bit must be set when passing the MRU to firmware during vnic configuration. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Add support for firmware updates for additional processors.Rob Swindell2016-07-022-0/+21
| | | | | | | | | Add support to the Ethtool FLASHDEV command handler for additional firmware types to cover all the on-chip processors. Signed-off-by: Rob Swindell <rob.swindell@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Request firmware reset after successful firwmare updateRob Swindell2016-07-021-0/+2
| | | | | | | | | Upon successful mgmt processor firmware update, request a self reset upon next PCIe reset (e.g. system reboot). Signed-off-by: Rob Swindell <rob.swindell@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Add support for updating flash more securelyRob Swindell2016-07-022-1/+3
| | | | | | | | | | To support Secure Firmware Update, we must be able to allocate a staging area in the Flash. This patch adds support for the "update" type to tell firmware to do that. Signed-off-by: Rob Swindell <rob.swindell@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Do function reset on the 1st PF open only.Michael Chan2016-07-022-6/+17
| | | | | | | | | | | | Calling the firmware to do function reset on the PF will kill all the VFs. To prevent that, we call function reset on the 1st PF open before any VF can be activated. On subsequent PF opens (with possibly some active VFs), a bit has been set and we'll skip the function reset. VF driver will always do function reset on every open. If there is an AER event, we will always do function reset. Signed-off-by: Michael Chan <michael.chan@broadocm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: Update firmware spec. to 1.3.0.Michael Chan2016-07-022-32/+66
| | | | | | | And update driver version to 1.3.0. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnxt_en: VF/NPAR should return -EOPNOTSUPP for unsupported ethtool ops.Michael Chan2016-07-021-2/+2
| | | | | | | Returning 0 for doing nothing is confusing to the user. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: davinci_emac: use phy_ethtool_{get|set}_link_ksettingsPhilippe Reynes2016-07-021-37/+2Star
| | | | | | | | There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: davinci_emac: use phydev from struct net_devicePhilippe Reynes2016-07-021-34/+27Star
| | | | | | | | | | The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phy in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/mlx5e: Introduce SRIOV VF representorsHadar Hen Zion2016-07-026-19/+574
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the relevant profile functions to create mlx5e driver instance serving as VF representor. When SRIOV offloads mode is enabled, each VF will have a representor netdevice instance on the host. To do that, we also export set of shared service functions from en_main.c, such that they can be used by both NIC and repsresentors netdevs. The newly created representor netdevice has a basic set of net_device_ops which are the same ndo functions as the NIC netdevice and an ndo of it's own for phys port name. The profiling infrastructure allow sharing code between the NIC and the vport representor even though the representor has only a subset of the NIC functionality. The VF reps and the PF which is used in that mode to represent the uplink, expose switchdev ops. Currently the only op supposed is attr get for the port parent ID which here serves to identify net-devices belonging to the same HW E-Switch. Other than that, no offloading is implemented and hence switching functionality is achieved if one sets SW switching rules, e.g using tc, bridge or ovs. Port phys name (ndo_get_phys_port_name) is implemented to allow exporting to user-space the VF vport number and along with the switchdev port parent id (phys_switch_id) enable a udev base consistent naming scheme: SUBSYSTEM=="net", ACTION=="add", ATTR{phys_switch_id}=="<phys_switch_id>", \ ATTR{phys_port_name}!="", NAME="$PF_NIC$attr{phys_port_name}" where phys_switch_id is exposed by the PF (and VF reps) and $PF_NIC is the name of the PF netdevice. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/mlx5: Add Representors registration APIHadar Hen Zion2016-07-025-7/+97
| | | | | | | | | | | | | | | | | Introduce E-Switch registration/unregister representors functions. Those functions are called by the mlx5e driver when the PF NIC is created upon pci probe action regardless of the E-Switch mode (NONE, LEGACY or OFFLOADS). Adding basic E-Switch database that will hold the vport represntors upon creation. This patch doesn't add any new functionality. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/mlx5e: Add support for multiple profilesHadar Hen Zion2016-07-022-118/+240
| | | | | | | | | | | | | | | | | | | To allow support in representor netdevices where we create more than one netdevice per NIC, add profiles to the mlx5e driver. The profiling allows for creation of mlx5e instances with different characteristics. Each profile implements its own behavior using set of function pointers defined in struct mlx5e_profile. This is done to allow for avoiding complex per profix branching in the code. Currently only the profile for the conventional NIC is implemented, which is of use when a netdev is created upon pci probe. This patch doesn't add any new functionality. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/mlx5e: Mark enabled RQTs instances explicitlyHadar Hen Zion2016-07-023-23/+37
| | | | | | | | | | | | | | | | | | | | | In the current driver implementation two types of receive queue tables (RQTs) are in use - direct and indirect. Change the driver to mark each new created RQT (direct or indirect) as "enabled". This behaviour is needed for introducing new mlx5e instances which serve to represent SRIOV VFs. The VF representors will have only one type of RQTs (direct). An "enabled" flag is added to each RQT to allow better handling and code sharing between the representors and the nic netdevices. This patch doesn't add any new functionality. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>