#
f299ee70 |
| 24-Apr-2024 |
Bui Quang Minh <minhquangbui99@gmail.com> |
octeontx2-af: avoid off-by-one read from userspace
We try to access count + 1 byte from userspace with memdup_user(buffer, count + 1). However, the userspace only provides buffer of count bytes and
octeontx2-af: avoid off-by-one read from userspace
We try to access count + 1 byte from userspace with memdup_user(buffer, count + 1). However, the userspace only provides buffer of count bytes and only these count bytes are verified to be okay to access. To ensure the copied buffer is NUL terminated, we use memdup_user_nul instead.
Fixes: 3a2eb515d136 ("octeontx2-af: Fix an off by one in rvu_dbg_qsize_write()") Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com> Link: https://lore.kernel.org/r/20240424-fix-oob-read-v2-6-f1f1b53a10f4@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
3b43f19d |
| 05-Mar-2024 |
Sai Krishna <saikrishnag@marvell.com> |
octeontx2-pf: Add TC flower offload support for TCP flags
This patch adds TC offload support for matching TCP flags from TCP header.
Example usage: tc qdisc add dev eth0 ingress
TC rule to drop th
octeontx2-pf: Add TC flower offload support for TCP flags
This patch adds TC offload support for matching TCP flags from TCP header.
Example usage: tc qdisc add dev eth0 ingress
TC rule to drop the TCP SYN packets: tc filter add dev eth0 ingress protocol ip flower ip_proto tcp tcp_flags 0x02/0x3f skip_sw action drop
Signed-off-by: Sai Krishna <saikrishnag@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
4f09947a |
| 30-Nov-2023 |
Nithin Dabilpuram <ndabilpuram@marvell.com> |
octeontx2-af: debugfs: update CQ context fields
This patch update the CQ structure fields to support the feature added in new silicons and also dump these fields in debugfs.
Signed-off-by: Nithin D
octeontx2-af: debugfs: update CQ context fields
This patch update the CQ structure fields to support the feature added in new silicons and also dump these fields in debugfs.
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Signed-off-by: Geetha sowjanya <gakula@marvell.com> Link: https://lore.kernel.org/r/20231130060703.16769-1-gakula@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
a8d4879d |
| 22-Nov-2023 |
Geetha sowjanya <gakula@marvell.com> |
octeontx2-pf: TC flower offload support for ICMP type and code
Adds tc offload support for matching on ICMP type and code.
Example usage: To enable adding tc ingress rules tc qdisc add dev
octeontx2-pf: TC flower offload support for ICMP type and code
Adds tc offload support for matching on ICMP type and code.
Example usage: To enable adding tc ingress rules tc qdisc add dev eth0 ingress
TC rule drop the ICMP echo reply: tc filter add dev eth0 protocol ip parent ffff: \ flower ip_proto icmp type 8 code 0 skip_sw action drop
TC rule to drop ICMPv6 echo reply: tc filter add dev eth0 protocol ipv6 parent ffff: flower \ indev eth0 ip_proto icmpv6 type 128 code 0 action drop
Signed-off-by: Geetha sowjanya <gakula@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
a63df366 |
| 21-Sep-2023 |
Hariprasad Kelam <hkelam@marvell.com> |
octeontx2-pf: Tc flower offload support for MPLS
This patch extends flower offload support for MPLS protocol. Due to hardware limitation, currently driver supports lse depth up to 4.
Signed-off-by:
octeontx2-pf: Tc flower offload support for MPLS
This patch extends flower offload support for MPLS protocol. Due to hardware limitation, currently driver supports lse depth up to 4.
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
21e74835 |
| 04-Aug-2023 |
Suman Ghosh <sumang@marvell.com> |
octeontx2-af: TC flower offload support for inner VLAN
Extend the current TC flower offload support to enable filters matching inner VLAN, and support offload of those filters to hardware.
Signed-o
octeontx2-af: TC flower offload support for inner VLAN
Extend the current TC flower offload support to enable filters matching inner VLAN, and support offload of those filters to hardware.
Signed-off-by: Suman Ghosh <sumang@marvell.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20230804045935.3010554-3-sumang@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
73b4c04e |
| 01-Aug-2023 |
Ratheesh Kannoth <rkannoth@marvell.com> |
octeontx2-pf: TC flower offload support for SPI field
Driver support to offload TC flower rules which matches against SPI field of IPSEC packets (AH/ESP).
Signed-off-by: Ratheesh Kannoth <rkannoth@
octeontx2-pf: TC flower offload support for SPI field
Driver support to offload TC flower rules which matches against SPI field of IPSEC packets (AH/ESP).
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
ab6dddd2 |
| 13-May-2023 |
Subbaraya Sundeep <sbhatta@marvell.com> |
octeontx2-pf: qos send queues management
Current implementation is such that the number of Send queues (SQs) are decided on the device probe which is equal to the number of online cpus. These SQs ar
octeontx2-pf: qos send queues management
Current implementation is such that the number of Send queues (SQs) are decided on the device probe which is equal to the number of online cpus. These SQs are allocated and deallocated in interface open and c lose calls respectively.
This patch defines new APIs for initializing and deinitializing Send queues dynamically and allocates more number of transmit queues for QOS feature.
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
c222b292 |
| 26-Apr-2023 |
Geetha sowjanya <gakula@marvell.com> |
octeonxt2-af: mcs: Fix per port bypass config
For each lmac port, MCS has two MCS_TOP_SLAVE_CHANNEL_CONFIGX registers. For CN10KB both register need to be configured for the port level mcs bypass to
octeonxt2-af: mcs: Fix per port bypass config
For each lmac port, MCS has two MCS_TOP_SLAVE_CHANNEL_CONFIGX registers. For CN10KB both register need to be configured for the port level mcs bypass to work. This patch also sets bitmap of flowid/secy entry reserved for default bypass so that these entries can be shown in debugfs.
Fixes: bd69476e86fc ("octeontx2-af: cn10k: mcs: Install a default TCAM for normal traffic") Signed-off-by: Geetha sowjanya <gakula@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
#
ea9dd2e5 |
| 07-Mar-2023 |
Suman Ghosh <sumang@marvell.com> |
octeontx2-af: Unlock contexts in the queue context cache in case of fault detection
NDC caches contexts of frequently used queue's (Rx and Tx queues) contexts. Due to a HW errata when NDC detects fa
octeontx2-af: Unlock contexts in the queue context cache in case of fault detection
NDC caches contexts of frequently used queue's (Rx and Tx queues) contexts. Due to a HW errata when NDC detects fault/poision while accessing contexts it could go into an illegal state where a cache line could get locked forever. To makesure all cache lines in NDC are available for optimum performance upon fault/lockerror/posion errors scan through all cache lines in NDC and clear the lock bit.
Fixes: 4a3581cd5995 ("octeontx2-af: NPA AQ instruction enqueue support") Signed-off-by: Suman Ghosh <sumang@marvell.com> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by: Sai Krishna <saikrishnag@marvell.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
f2e664ad |
| 05-Dec-2022 |
Rakesh Babu Saladi <rsaladi2@marvell.com> |
octeontx2-af: Support variable number of lmacs
Most of the code in CGX/RPM driver assumes that max lmacs per given MAC as always, 4 and the number of MAC blocks also as 4. With this assumption, the
octeontx2-af: Support variable number of lmacs
Most of the code in CGX/RPM driver assumes that max lmacs per given MAC as always, 4 and the number of MAC blocks also as 4. With this assumption, the max number of interfaces supported is hardcoded to 16. This creates a problem as next gen CN10KB silicon MAC supports 8 lmacs per MAC block.
This patch solves the problem by using "max lmac per MAC block" value from constant csrs and uses cgx_cnt_max value which is populated based number of MAC blocks supported by silicon.
Signed-off-by: Rakesh Babu Saladi <rsaladi2@marvell.com> Signed-off-by: Hariprasad Kelam <hkelam@marvell.com> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
#
c672e372 |
| 24-Nov-2022 |
Suman Ghosh <sumang@marvell.com> |
octeontx2-pf: Add support to filter packet based on IP fragment
1. Added support to filter packets based on IP fragment. For IPv4 packets check for ip_flag == 0x20 (more fragment bit set). For IPv6
octeontx2-pf: Add support to filter packet based on IP fragment
1. Added support to filter packets based on IP fragment. For IPv4 packets check for ip_flag == 0x20 (more fragment bit set). For IPv6 packets check for next_header == 0x2c (next_header set to 'fragment header for IPv6') 2. Added configuration support from both "ethtool ntuple" and "tc flower".
Signed-off-by: Suman Ghosh <sumang@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
d6660880 |
| 17-Nov-2022 |
Yang Yingliang <yangyingliang@huawei.com> |
octeontx2-af: debugsfs: fix pci device refcount leak
As comment of pci_get_domain_bus_and_slot() says, it returns a pci device with refcount increment, when finish using it, the caller must decremen
octeontx2-af: debugsfs: fix pci device refcount leak
As comment of pci_get_domain_bus_and_slot() says, it returns a pci device with refcount increment, when finish using it, the caller must decrement the reference count by calling pci_dev_put().
So before returning from rvu_dbg_rvu_pf_cgx_map_display() or cgx_print_dmac_flt(), pci_dev_put() is called to avoid refcount leak.
Fixes: dbc52debf95f ("octeontx2-af: Debugfs support for DMAC filters") Fixes: e2fb37303865 ("octeontx2-af: Display CGX, NIX and PF map in debugfs.") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20221117124658.162409-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
2cee6401 |
| 31-Oct-2022 |
Suman Ghosh <sumang@marvell.com> |
octeontx2-af: Allow mkex profile without DMAC and add L2M/L2B header extraction support
1. It is possible to have custom mkex profiles which do not extract DMAC at all into the key. Hence allow mkex
octeontx2-af: Allow mkex profile without DMAC and add L2M/L2B header extraction support
1. It is possible to have custom mkex profiles which do not extract DMAC at all into the key. Hence allow mkex profiles which do not have DMAC to be loaded into MCAM hardware. This patch also adds debugging prints needed to identify profiles with wrong configuration.
2. If a mkex profile set "l2l3mb" field for Rx interface, then Rx multicast and broadcast entry should be configured.
Signed-off-by: Suman Ghosh <sumang@marvell.com> Link: https://lore.kernel.org/r/20221031090856.1404303-1-sumang@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
d06c2aba |
| 01-Oct-2022 |
Geetha sowjanya <gakula@marvell.com> |
octeontx2-af: cn10k: mcs: Add debugfs support
This patch adds debugfs entry to dump MCS secy, sc, sa, flowid and port stats. This helps in debugging the packet path and to figure out where exactly p
octeontx2-af: cn10k: mcs: Add debugfs support
This patch adds debugfs entry to dump MCS secy, sc, sa, flowid and port stats. This helps in debugging the packet path and to figure out where exactly packet was dropped.
Signed-off-by: Geetha sowjanya <gakula@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
87e4ea29 |
| 08-Jul-2022 |
Ratheesh Kannoth <rkannoth@marvell.com> |
octeontx2-af: Debugsfs support for exact match.
There debugfs files created. 1. General information on exact match table 2. Exact match table entries. 3. NPC mcam drop on hit count stats.
Signed-of
octeontx2-af: Debugsfs support for exact match.
There debugfs files created. 1. General information on exact match table 2. Exact match table entries. 3. NPC mcam drop on hit count stats.
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
69d7d257 |
| 07-Jul-2022 |
Jakub Kicinski <kuba@kernel.org> |
Revert "Merge branch 'octeontx2-af-next'"
This reverts commit 2ef8e39f58f08589ab035223c2687830c0eba30f, reversing changes made to e7ce9fc9ad38773b660ef663ae98df4f93cb6a37.
There are build warnings
Revert "Merge branch 'octeontx2-af-next'"
This reverts commit 2ef8e39f58f08589ab035223c2687830c0eba30f, reversing changes made to e7ce9fc9ad38773b660ef663ae98df4f93cb6a37.
There are build warnings here which break the normal build due to -Werror. Ratheesh was nice enough to quickly follow up with fixes but didn't hit all the warnings I see on GCC 12 so to unlock net-next from taking patches let get this series out for now.
Link: https://lore.kernel.org/r/20220707013201.1372433-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
01b9228b |
| 06-Jul-2022 |
Ratheesh Kannoth <rkannoth@marvell.com> |
octeontx2-af: Debugsfs support for exact match.
There debugfs files created. 1. General information on exact match table 2. Exact match table entries. 3. NPC mcam drop on hit count stats.
Signed-of
octeontx2-af: Debugsfs support for exact match.
There debugfs files created. 1. General information on exact match table 2. Exact match table entries. 3. NPC mcam drop on hit count stats.
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
0b9f1b26 |
| 30-Apr-2022 |
Niels Dossche <dossche.niels@gmail.com> |
octeontx2-af: debugfs: fix error return of allocations
Current memory failure code in the debugfs returns -ENOSPC. This is normally used for indicating that there is no space left on the device and
octeontx2-af: debugfs: fix error return of allocations
Current memory failure code in the debugfs returns -ENOSPC. This is normally used for indicating that there is no space left on the device and is not applicable for memory allocation failures. Replace this with -ENOMEM.
Signed-off-by: Niels Dossche <dossche.niels@gmail.com> Link: https://lore.kernel.org/r/20220430194656.44357-1-dossche.niels@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
c5d731c5 |
| 21-Jan-2022 |
Geetha sowjanya <gakula@marvell.com> |
octeontx2-pf: cn10k: Ensure valid pointers are freed to aura
While freeing SQB pointers to aura, driver first memcpy to target address and then triggers lmtst operation to free pointer to the aura.
octeontx2-pf: cn10k: Ensure valid pointers are freed to aura
While freeing SQB pointers to aura, driver first memcpy to target address and then triggers lmtst operation to free pointer to the aura. We need to ensure(by adding dmb barrier)that memcpy is finished before pointers are freed to the aura. This patch also adds the missing sq context structure entry in debugfs.
Fixes: ef6c8da71eaf ("octeontx2-pf: cn10K: Reserve LMTST lines per core") Signed-off-by: Geetha sowjanya <gakula@marvell.com> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
a280ef90 |
| 17-Nov-2021 |
Dan Carpenter <dan.carpenter@oracle.com> |
octeontx2-af: debugfs: don't corrupt user memory
The user supplies the "count" value to say how big its read buffer is. The rvu_dbg_lmtst_map_table_display() function does not take the "count" into
octeontx2-af: debugfs: don't corrupt user memory
The user supplies the "count" value to say how big its read buffer is. The rvu_dbg_lmtst_map_table_display() function does not take the "count" into account but instead just copies the whole table, potentially corrupting the user's data.
Introduce the "ret" variable to store how many bytes we can copy. Also I changed the type of "off" to size_t to make using min() simpler.
Fixes: 0daa55d033b0 ("octeontx2-af: cn10k: debugfs for dumping LMTST map table") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20211117073454.GD5237@kili Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
9716a40a |
| 27-Oct-2021 |
Rakesh Babu <rsaladi2@marvell.com> |
octeontx2-af: debugfs: Add channel and channel mask.
This patch is to dispaly channel and channel_mask for each RX interface of NPC MCAM rule.
Signed-off-by: Rakesh Babu <rsaladi2@marvell.com> Sign
octeontx2-af: debugfs: Add channel and channel mask.
This patch is to dispaly channel and channel_mask for each RX interface of NPC MCAM rule.
Signed-off-by: Rakesh Babu <rsaladi2@marvell.com> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
0daa55d0 |
| 27-Oct-2021 |
Harman Kalra <hkalra@marvell.com> |
octeontx2-af: cn10k: debugfs for dumping LMTST map table
CN10k SoCs use atomic stores of up to 128 bytes to submit packets/instructions into co-processor cores. The enqueueing is performed using Lar
octeontx2-af: cn10k: debugfs for dumping LMTST map table
CN10k SoCs use atomic stores of up to 128 bytes to submit packets/instructions into co-processor cores. The enqueueing is performed using Large Memory Transaction Store (LMTST) operations. They allow for lockless enqueue operations - i.e., two different CPU cores can submit instructions to the same queue without needing to lock the queue or synchronize their accesses.
This patch implements a new debugfs entry for dumping LMTST map table present on CN10K, as this might be very useful to debug any issue in case of shared LMTST region among multiple pci functions.
Signed-off-by: Harman Kalra <hkalra@marvell.com> Signed-off-by: Bhaskara Budiredla <bbudiredla@marvell.com> Signed-off-by: Rakesh Babu <rsaladi2@marvell.com> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
1910ccf0 |
| 27-Oct-2021 |
Rakesh Babu Saladi <rsaladi2@marvell.com> |
octeontx2-af: debugfs: Minor changes.
Few changes in rvu_debugfs.c file to remove unwanted characters, indenting the code, added a new comment line etc.
Signed-off-by: Rakesh Babu Saladi <rsaladi2@
octeontx2-af: debugfs: Minor changes.
Few changes in rvu_debugfs.c file to remove unwanted characters, indenting the code, added a new comment line etc.
Signed-off-by: Rakesh Babu Saladi <rsaladi2@marvell.com> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
c2d4c543 |
| 27-Oct-2021 |
Rakesh Babu Saladi <rsaladi2@marvell.com> |
octeontx2-af: Fix possible null pointer dereference.
This patch fixes possible null pointer dereference in files "rvu_debugfs.c" and "rvu_nix.c"
Fixes: 8756828a8148 ("octeontx2-af: Add NPA aura and
octeontx2-af: Fix possible null pointer dereference.
This patch fixes possible null pointer dereference in files "rvu_debugfs.c" and "rvu_nix.c"
Fixes: 8756828a8148 ("octeontx2-af: Add NPA aura and pool contexts to debugfs") Fixes: 9a946def264d ("octeontx2-af: Modify nix_vtag_cfg mailbox to support TX VTAG entries") Signed-off-by: Rakesh Babu Saladi <rsaladi2@marvell.com> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|