10fad798 | 17-Jan-2025 |
Shinas Rasheed <srasheed@marvell.com> |
octeon_ep: update tx/rx stats locally for persistence
Update tx/rx stats locally, so that ndo_get_stats64() can use that and not rely on per queue resources to obtain statistics. The latter used to
octeon_ep: update tx/rx stats locally for persistence
Update tx/rx stats locally, so that ndo_get_stats64() can use that and not rely on per queue resources to obtain statistics. The latter used to cause race conditions when the device stopped.
Signed-off-by: Shinas Rasheed <srasheed@marvell.com> Link: https://patch.msgid.link/20250117094653.2588578-3-srasheed@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
eb592008 | 17-Oct-2024 |
Aleksandr Mishin <amishin@t-argos.ru> |
octeon_ep: Add SKB allocation failures handling in __octep_oq_process_rx()
build_skb() returns NULL in case of a memory allocation failure so handle it inside __octep_oq_process_rx() to avoid NULL p
octeon_ep: Add SKB allocation failures handling in __octep_oq_process_rx()
build_skb() returns NULL in case of a memory allocation failure so handle it inside __octep_oq_process_rx() to avoid NULL pointer dereference.
__octep_oq_process_rx() is called during NAPI polling by the driver. If skb allocation fails, keep on pulling packets out of the Rx DMA queue: we shouldn't break the polling immediately and thus falsely indicate to the octep_napi_poll() that the Rx pressure is going down. As there is no associated skb in this case, don't process the packets and don't push them up the network stack - they are skipped.
Helper function is implemented to unmmap/flush all the fragment buffers used by the dropped packet. 'alloc_failures' counter is incremented to mark the skb allocation error in driver statistics.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 37d79d059606 ("octeon_ep: add Tx/Rx processing and interrupt support") Suggested-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
show more ...
|
4ebb86a9 | 15-Dec-2023 |
Shinas Rasheed <srasheed@marvell.com> |
octeon_ep: support firmware notifications for VFs
Notifications from firmware to vf has to pass through PF control mbox and via PF-VF mailboxes. The notifications have to be parsed out from the cont
octeon_ep: support firmware notifications for VFs
Notifications from firmware to vf has to pass through PF control mbox and via PF-VF mailboxes. The notifications have to be parsed out from the control mbox and passed to the PF-VF mailbox in order to reach the corresponding VF. Version compatibility should also be checked before messages are passed to the mailboxes.
Signed-off-by: Shinas Rasheed <srasheed@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
e28db8cb | 15-Dec-2023 |
Shinas Rasheed <srasheed@marvell.com> |
octeon_ep: control net framework to support VF offloads
Inquire firmware on supported offloads, as well as convey offloads enabled dynamically to firmware for the VFs. Implement control net API to s
octeon_ep: control net framework to support VF offloads
Inquire firmware on supported offloads, as well as convey offloads enabled dynamically to firmware for the VFs. Implement control net API to support the same.
Signed-off-by: Shinas Rasheed <srasheed@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
c130e589 | 15-Dec-2023 |
Shinas Rasheed <srasheed@marvell.com> |
octeon_ep: PF-VF mailbox version support
Add PF-VF mailbox initial version support
Signed-off-by: Shinas Rasheed <srasheed@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: P
octeon_ep: PF-VF mailbox version support
Add PF-VF mailbox initial version support
Signed-off-by: Shinas Rasheed <srasheed@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
284f7176 | 08-Dec-2023 |
Shinas Rasheed <srasheed@marvell.com> |
octeon_ep: explicitly test for firmware ready value
The firmware ready value is 1, and get firmware ready status function should explicitly test for that value. The firmware ready value read will be
octeon_ep: explicitly test for firmware ready value
The firmware ready value is 1, and get firmware ready status function should explicitly test for that value. The firmware ready value read will be 2 after driver load, and on unbind till firmware rewrites the firmware ready back to 0, the value seen by driver will be 2, which should be regarded as not ready.
Fixes: 10c073e40469 ("octeon_ep: defer probe if firmware not ready") Signed-off-by: Shinas Rasheed <srasheed@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
15bc8121 | 29-Nov-2023 |
Shinas Rasheed <srasheed@marvell.com> |
octeon_ep: set backpressure watermark for RX queues
Set backpressure watermark for hardware RX queues. Backpressure gets triggered when the available buffers of a hardware RX queue falls below the s
octeon_ep: set backpressure watermark for RX queues
Set backpressure watermark for hardware RX queues. Backpressure gets triggered when the available buffers of a hardware RX queue falls below the set watermark. This backpressure will propagate to packet processing pipeline in the OCTEON card, so that the host receives fewer packets and prevents packet dropping at host.
Signed-off-by: Shinas Rasheed <srasheed@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
068b2b64 | 29-Nov-2023 |
Shinas Rasheed <srasheed@marvell.com> |
octeon_ep: support OCTEON CN98 devices
Add PCI Endpoint NIC support for Octeon CN98 devices. CN98 devices are part of Octeon 9 family products with similar PCI NIC characteristics to CN93, already s
octeon_ep: support OCTEON CN98 devices
Add PCI Endpoint NIC support for Octeon CN98 devices. CN98 devices are part of Octeon 9 family products with similar PCI NIC characteristics to CN93, already supported driver.
Add CN98 card to the device id table, as well as support differences in the register fields and certain usage scenarios such as unload.
Signed-off-by: Shinas Rasheed <srasheed@marvell.com> Link: https://lore.kernel.org/r/20231129045348.2538843-3-srasheed@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
0a5f8534 | 22-Nov-2023 |
Shinas Rasheed <srasheed@marvell.com> |
octeon_ep: get max rx packet length from firmware
Max receive packet length can vary across SoCs, so this needs to be queried from respective firmware and filled by driver. A control net get mtu api
octeon_ep: get max rx packet length from firmware
Max receive packet length can vary across SoCs, so this needs to be queried from respective firmware and filled by driver. A control net get mtu api should be implemented to do the same.
Signed-off-by: Shinas Rasheed <srasheed@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|