#
821de68c |
| 07-Feb-2023 |
Yu Xiao <yu.xiao@corigine.com> |
nfp: ethtool: fix the bug of setting unsupported port speed
Unsupported port speed can be set and cause error. Now fixing it and return an error if setting unsupported speed.
This fix depends on th
nfp: ethtool: fix the bug of setting unsupported port speed
Unsupported port speed can be set and cause error. Now fixing it and return an error if setting unsupported speed.
This fix depends on the following, which was included in v6.2-rc1: commit a61474c41e8c ("nfp: ethtool: support reporting link modes").
Fixes: 7c698737270f ("nfp: add support for .set_link_ksettings()") Signed-off-by: Yu Xiao <yu.xiao@corigine.com> Signed-off-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
ac73d4bf |
| 02-Nov-2022 |
Jiri Pirko <jiri@nvidia.com> |
net: make drivers to use SET_NETDEV_DEVLINK_PORT to set devlink_port
Benefit from the previously implemented tracking of netdev events in devlink code and instead of calling devlink_port_type_eth_s
net: make drivers to use SET_NETDEV_DEVLINK_PORT to set devlink_port
Benefit from the previously implemented tracking of netdev events in devlink code and instead of calling devlink_port_type_eth_set() and devlink_port_type_clear() to set devlink port type and link to related netdev, use SET_NETDEV_DEVLINK_PORT() macro to assign devlink_port pointer to netdevice which is about to be registered.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
62fad9e6 |
| 25-Aug-2022 |
Yinjun Zhang <yinjun.zhang@corigine.com> |
nfp: propagate port speed from management firmware
In future releases the NIC application firmware may be indifferent to port speeds - not built for specific port speeds - and consequently it will n
nfp: propagate port speed from management firmware
In future releases the NIC application firmware may be indifferent to port speeds - not built for specific port speeds - and consequently it will not be able to report VF port speeds to the driver without first learning them. With this change, the driver will pass the speed of physical ports from management firmware to application firmware, and the latter will copy the speed of port 0 to all the active VFs. So that the driver can get VF port speed as before.
The port speed of a VF may be requested from userspace using:
ethtool <vf-intf>
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com> Reviewed-by: Louis Peens <louis.peens@corigine.com> Signed-off-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
#
706217c1 |
| 15-Mar-2022 |
Jakub Kicinski <kuba@kernel.org> |
devlink: pass devlink_port to port_split / port_unsplit callbacks
Now that devlink ports are protected by the instance lock it seems natural to pass devlink_port as an argument to the port_split / p
devlink: pass devlink_port to port_split / port_unsplit callbacks
Now that devlink ports are protected by the instance lock it seems natural to pass devlink_port as an argument to the port_split / port_unsplit callbacks.
This should save the drivers from doing a lookup.
In theory drivers may have supported unsplitting ports which were not registered prior to this change.
Reviewed-by: Ido Schimmel <idosch@nvidia.com> Tested-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
49db8a70 |
| 26-Jan-2022 |
Simon Horman <simon.horman@corigine.com> |
nfp: only use kdoc style comments for kdoc
Update comments to only use kdoc style comments, starting with '/**', for kdoc.
Flagged by ./scripts/kernel-doc
Signed-off-by: Simon Horman <simon.horman
nfp: only use kdoc style comments for kdoc
Update comments to only use kdoc style comments, starting with '/**', for kdoc.
Flagged by ./scripts/kernel-doc
Signed-off-by: Simon Horman <simon.horman@corigine.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20220126090803.5582-1-simon.horman@corigine.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
6a143a7c |
| 17-Mar-2021 |
Alexander Duyck <alexanderduyck@fb.com> |
nfp: Replace nfp_pr_et with ethtool_sprintf
The nfp_pr_et function is nearly identical to ethtool_sprintf except for the fact that it passes the pointer by value and as a return whereas ethtool_spri
nfp: Replace nfp_pr_et with ethtool_sprintf
The nfp_pr_et function is nearly identical to ethtool_sprintf except for the fact that it passes the pointer by value and as a return whereas ethtool_sprintf passes it as a pointer.
Since they are so close just update nfp to make use of ethtool_sprintf
Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Alexander Duyck <alexanderduyck@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
faaccbe6 |
| 24-Mar-2019 |
Jiri Pirko <jiri@mellanox.com> |
nfp: move devlink port type set after netdev registration
Similar to other driver, move the port type set after netdev registration is done. Along with that, clear the type before unregistration.
S
nfp: move devlink port type set after netdev registration
Similar to other driver, move the port type set after netdev registration is done. Along with that, clear the type before unregistration.
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
a5084bb7 |
| 06-Feb-2019 |
Florian Fainelli <f.fainelli@gmail.com> |
nfp: Implement ndo_get_port_parent_id()
NFP only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID, which makes it a great candidate to be converted to use the ndo_get_port_parent_id() NDO instead of implem
nfp: Implement ndo_get_port_parent_id()
NFP only supports SWITCHDEV_ATTR_ID_PORT_PARENT_ID, which makes it a great candidate to be converted to use the ndo_get_port_parent_id() NDO instead of implementing switchdev_port_attr_get().
Since NFP uses switchdev_port_same_parent_id() convert it to use netdev_port_same_parent_id().
Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
96de2506 |
| 11-Oct-2018 |
Jakub Kicinski <jakub.kicinski@netronome.com> |
nfp: replace long license headers with SPDX
Replace the repeated license text with SDPX identifiers. While at it bump the Copyright dates for files we touched this year.
Signed-off-by: Edwin Peer <
nfp: replace long license headers with SPDX
Replace the repeated license text with SDPX identifiers. While at it bump the Copyright dates for files we touched this year.
Signed-off-by: Edwin Peer <edwin.peer@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Nic Viljoen <nick.viljoen@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
21f31bc0 |
| 26-May-2018 |
Jakub Kicinski <jakub.kicinski@netronome.com> |
nfp: allow apps to add extra stats to ports
Allow nfp apps to add extra ethtool stats.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.n
nfp: allow apps to add extra stats to ports
Allow nfp apps to add extra ethtool stats.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
290f54db |
| 22-May-2018 |
Jakub Kicinski <jakub.kicinski@netronome.com> |
nfp: use split in naming of PCIe PF ports
PCI PFs can host more than one logical endpoint. In NFP terms this means having more than one vNIC for PCIe PF. The vNICs are usually corresponding 1:1 to
nfp: use split in naming of PCIe PF ports
PCI PFs can host more than one logical endpoint. In NFP terms this means having more than one vNIC for PCIe PF. The vNICs are usually corresponding 1:1 to Ethernet ports. In core NIC we use the legacy idea of vNIC *being* the Ethernet port, hence netdevs put pX(sY) in their phys_port_name, like Ethernet ports would. When ASIC ports are fully represented we need to be able to name different PCIe PF ports, too. Use a scheme similar to Ethernet ports - pfXsY, for PCIe PF number X, sub-port Y.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
1f700367 |
| 22-May-2018 |
Jakub Kicinski <jakub.kicinski@netronome.com> |
nfp: abm: force Ethternet port up
Current control firmware does not cater too well to multi-host applications. There is no way to check which hosts are up or otherwise negotiate what the state of t
nfp: abm: force Ethternet port up
Current control firmware does not cater too well to multi-host applications. There is no way to check which hosts are up or otherwise negotiate what the state of the external port (the Ethernet port) should be. Make sure the link is up when driver loads, and don't take it down when Ethernet port netdev is closed.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
d692403e |
| 08-Feb-2018 |
Jakub Kicinski <jakub.kicinski@netronome.com> |
nfp: forbid disabling hw-tc-offload on representors while offload active
All netdevs which can accept TC offloads must implement .ndo_set_features(). nfp_reprs currently do not do that, which means
nfp: forbid disabling hw-tc-offload on representors while offload active
All netdevs which can accept TC offloads must implement .ndo_set_features(). nfp_reprs currently do not do that, which means hw-tc-offload can be turned on and off even when offloads are active.
Whether the offloads are active is really a question to nfp_ports, so remove the per-app tc_busy callback indirection thing, and simply count the number of offloaded items in nfp_port structure.
Fixes: 8a2768732a4d ("nfp: provide infrastructure for offloading flower based TC filters") Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Tested-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
745eaf9a |
| 17-Nov-2017 |
Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> |
nfp: fix vlan receive MAC statistics typo
Correct typo in vlan receive MAC stats. Previously the MAC statistics reported in ethtool for vlan receive contained a typo resulting in ethtool reporting r
nfp: fix vlan receive MAC statistics typo
Correct typo in vlan receive MAC stats. Previously the MAC statistics reported in ethtool for vlan receive contained a typo resulting in ethtool reporting rx_vlan_reveive_ok instead of rx_vlan_received_ok.
Fixes: a5950182c00e ("nfp: map mac_stats and vf_cfg BARs") Fixes: 098ce840c9ef ("nfp: report MAC statistics in ethtool") Reported-by: Brendan Galloway <brendan.galloway@netronome.com> Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
899a37ad |
| 18-Aug-2017 |
Jakub Kicinski <jakub.kicinski@netronome.com> |
nfp: add ethtool statistics for representors
Representors may be associated with both VFs or more importantly with physical ports. Allow vNIC and MAC statistics to be read with ethtool -S on repres
nfp: add ethtool statistics for representors
Representors may be associated with both VFs or more importantly with physical ports. Allow vNIC and MAC statistics to be read with ethtool -S on representors. In case of vNICs we reuse the vNIC statistic helper, we just need to swap RX and TX to give statistics the "switch perspective."
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
ef0ec676 |
| 18-Aug-2017 |
Jakub Kicinski <jakub.kicinski@netronome.com> |
nfp: add pointer to vNIC config memory to nfp_port structure
Simplify the statistics handling code by keeping pointer to vNIC's config memory in nfp_port. Note that this is referring to the represe
nfp: add pointer to vNIC config memory to nfp_port structure
Simplify the statistics handling code by keeping pointer to vNIC's config memory in nfp_port. Note that this is referring to the representor side of vNICs, vNIC side has the pointer in nfp_net.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
098ce840 |
| 18-Aug-2017 |
Jakub Kicinski <jakub.kicinski@netronome.com> |
nfp: report MAC statistics in ethtool
Add reporting of MAC statistics in ethtool. MAC statistics are read out from the MAC IP and accumulated by application FW, therefore their presence depends on
nfp: report MAC statistics in ethtool
Add reporting of MAC statistics in ethtool. MAC statistics are read out from the MAC IP and accumulated by application FW, therefore their presence depends on the application FW.
Add missing defines and string names for the statistics and dump them in ethtool -S.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
7344bea1 |
| 18-Aug-2017 |
Jakub Kicinski <jakub.kicinski@netronome.com> |
nfp: store pointer to MAC statistics in nfp_port
Store pointer to device memory containing MAC statistics in nfp_port. This simplifies representor code and will be used to dump those statistics in
nfp: store pointer to MAC statistics in nfp_port
Store pointer to device memory containing MAC statistics in nfp_port. This simplifies representor code and will be used to dump those statistics in ethtool as well.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
06726f30 |
| 18-Aug-2017 |
Jakub Kicinski <jakub.kicinski@netronome.com> |
nfp: link basic ethtool ops to representors
Start linking ethtool ops to representors. Begin by adding a separate ops structure and providing link state. Next patches will convert appropriate func
nfp: link basic ethtool ops to representors
Start linking ethtool ops to representors. Begin by adding a separate ops structure and providing link state. Next patches will convert appropriate functions to only use nfp_port, which will make them reusable on representors.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
de4784ca |
| 07-Aug-2017 |
Jiri Pirko <jiri@mellanox.com> |
net: sched: get rid of struct tc_to_netdev
Get rid of struct tc_to_netdev which is now just unnecessary container and rather pass per-type structures down to drivers directly. Along with that, conso
net: sched: get rid of struct tc_to_netdev
Get rid of struct tc_to_netdev which is now just unnecessary container and rather pass per-type structures down to drivers directly. Along with that, consolidate the naming of per-type structure variables in cls_*.
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
5fd9fc4e |
| 07-Aug-2017 |
Jiri Pirko <jiri@mellanox.com> |
net: sched: push cls related args into cls_common structure
As ndo_setup_tc is generic offload op for whole tc subsystem, does not really make sense to have cls-specific args. So move them under cls
net: sched: push cls related args into cls_common structure
As ndo_setup_tc is generic offload op for whole tc subsystem, does not really make sense to have cls-specific args. So move them under cls_common structurure which is embedded in all cls structs.
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
2572ac53 |
| 07-Aug-2017 |
Jiri Pirko <jiri@mellanox.com> |
net: sched: make type an argument for ndo_setup_tc
Since the type is always present, push it to be a separate argument to ndo_setup_tc. On the way, name the type enum and use it for arg type.
Signe
net: sched: make type an argument for ndo_setup_tc
Since the type is always present, push it to be a separate argument to ndo_setup_tc. On the way, name the type enum and use it for arg type.
Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
447e9ebf |
| 25-Jul-2017 |
Dirk van der Merwe <dirk.vandermerwe@netronome.com> |
nfp: set config bit (ifup/ifdown) on netdev open/close
When a netdev (PF netdev or representor) is opened or closed, set the physical port config bit appropriately - which powers UP/DOWN the PHY mod
nfp: set config bit (ifup/ifdown) on netdev open/close
When a netdev (PF netdev or representor) is opened or closed, set the physical port config bit appropriately - which powers UP/DOWN the PHY module for the physical interface.
The PHY is powered first in the HW/FW configuration step when opening the netdev and again last in the HW/FW configuration step when closing the netdev.
This is only applicable when there is a physical port associated with the netdev and if the NSP support this. Otherwise we silently ignore this step.
The 'nfp_eth_set_configured' can actually return positive values - updated the function documentation appropriately.
Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
8a276873 |
| 29-Jun-2017 |
Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> |
nfp: provide infrastructure for offloading flower based TC filters
Adds a flower based TC offload handler for representor devices, this is in addition to the bpf based offload handler. The changes i
nfp: provide infrastructure for offloading flower based TC filters
Adds a flower based TC offload handler for representor devices, this is in addition to the bpf based offload handler. The changes in this patch will be used in a follow-up patch to add tc flower offload to the NFP.
The flower app enables tc offloads on representors by default.
Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
8f15df60 |
| 29-Jun-2017 |
Simon Horman <simon.horman@netronome.com> |
nfp: add phys_switch_id support
Add phys_switch_id support by allowing lookup of SWITCHDEV_ATTR_ID_PORT_PARENT_ID via the nfp_repr_port_attr_get switchdev operation.
This is visible to user-space i
nfp: add phys_switch_id support
Add phys_switch_id support by allowing lookup of SWITCHDEV_ATTR_ID_PORT_PARENT_ID via the nfp_repr_port_attr_get switchdev operation.
This is visible to user-space in the phys_switch_id attribute of a netdev.
e.g.
cd /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 find . -name phys_switch_id | xargs grep . ./net/eth3/phys_switch_id:00154d1300bd ./net/eth4/phys_switch_id:00154d1300bd ./net/eth2/phys_switch_id:00154d1300bd grep: ./net/eth5/phys_switch_id: Operation not supported
In the above eth2 and eth3 and representor netdevs for the first and second physical port. eth4 is the representor for the PF. And eth5 is the PF netdev.
Signed-off-by: Simon Horman <simon.horman@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|