Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10, v6.6.9, v6.6.8, v6.6.7, v6.6.6, v6.6.5, v6.6.4, v6.6.3, v6.6.2, v6.5.11, v6.6.1, v6.5.10, v6.6, v6.5.9, v6.5.8, v6.5.7, v6.5.6, v6.5.5, v6.5.4, v6.5.3 |
|
#
281f65d2 |
| 07-Sep-2023 |
Jinjie Ruan <ruanjinjie@huawei.com> |
net: microchip: vcap api: Fix possible memory leak for vcap_dup_rule()
Inject fault When select CONFIG_VCAP_KUNIT_TEST, the below memory leak occurs. If kzalloc() for duprule succeeds, but the follo
net: microchip: vcap api: Fix possible memory leak for vcap_dup_rule()
Inject fault When select CONFIG_VCAP_KUNIT_TEST, the below memory leak occurs. If kzalloc() for duprule succeeds, but the following kmemdup() fails, the duprule, ckf and caf memory will be leaked. So kfree them in the error path.
unreferenced object 0xffff122744c50600 (size 192): comm "kunit_try_catch", pid 346, jiffies 4294896122 (age 911.812s) hex dump (first 32 bytes): 10 27 00 00 04 00 00 00 1e 00 00 00 2c 01 00 00 .'..........,... 00 00 00 00 00 00 00 00 18 06 c5 44 27 12 ff ff ...........D'... backtrace: [<00000000394b0db8>] __kmem_cache_alloc_node+0x274/0x2f8 [<0000000001bedc67>] kmalloc_trace+0x38/0x88 [<00000000b0612f98>] vcap_dup_rule+0x50/0x460 [<000000005d2d3aca>] vcap_add_rule+0x8cc/0x1038 [<00000000eef9d0f8>] test_vcap_xn_rule_creator.constprop.0.isra.0+0x238/0x494 [<00000000cbda607b>] vcap_api_rule_remove_in_front_test+0x1ac/0x698 [<00000000c8766299>] kunit_try_run_case+0xe0/0x20c [<00000000c4fe9186>] kunit_generic_run_threadfn_adapter+0x50/0x94 [<00000000f6864acf>] kthread+0x2e8/0x374 [<0000000022e639b3>] ret_from_fork+0x10/0x20
Fixes: 814e7693207f ("net: microchip: vcap api: Add a storage state to a VCAP rule") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v6.5.2, v6.1.51, v6.5.1, v6.1.50, v6.5, v6.1.49, v6.1.48 |
|
#
093db9cd |
| 18-Aug-2023 |
Ruan Jinjie <ruanjinjie@huawei.com> |
net: microchip: vcap api: Always return ERR_PTR for vcap_get_rule()
As Simon Horman suggests, update vcap_get_rule() to always return an ERR_PTR() and update the error detection conditions to use IS
net: microchip: vcap api: Always return ERR_PTR for vcap_get_rule()
As Simon Horman suggests, update vcap_get_rule() to always return an ERR_PTR() and update the error detection conditions to use IS_ERR(), which would be more cleaner in this case.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Suggested-by: Simon Horman <horms@kernel.org> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v6.1.46, v6.1.45, v6.1.44, v6.1.43 |
|
#
58e70126 |
| 02-Aug-2023 |
Li Zetao <lizetao1@huawei.com> |
net: microchip: vcap api: Use ERR_CAST() in vcap_decode_rule()
There is a warning reported by coccinelle:
./drivers/net/ethernet/microchip/vcap/vcap_api.c:2399:9-16: WARNING: ERR_CAST can be used w
net: microchip: vcap api: Use ERR_CAST() in vcap_decode_rule()
There is a warning reported by coccinelle:
./drivers/net/ethernet/microchip/vcap/vcap_api.c:2399:9-16: WARNING: ERR_CAST can be used with ri
Use ERR_CAST instead of ERR_PTR + PTR_ERR to simplify the conversion process.
Signed-off-by: Li Zetao <lizetao1@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v6.1.42, v6.1.41, v6.1.40, v6.1.39, v6.1.38, v6.1.37, v6.1.36, v6.4, v6.1.35, v6.1.34, v6.1.33, v6.1.32, v6.1.31, v6.1.30, v6.1.29 |
|
#
c515a444 |
| 13-May-2023 |
Anup Sharma <anupnewsmail@gmail.com> |
net: ethernet: microchip: vcap: Remove extra semicolon
Remove the extra semicolon at end. Issue identified using semicolon.cocci Coccinelle semantic patch.
drivers/net/ethernet/microchip/vcap/vcap_
net: ethernet: microchip: vcap: Remove extra semicolon
Remove the extra semicolon at end. Issue identified using semicolon.cocci Coccinelle semantic patch.
drivers/net/ethernet/microchip/vcap/vcap_api.c:1124:3-4: Unneeded semicolon drivers/net/ethernet/microchip/vcap/vcap_api.c:1165:3-4: Unneeded semicolon drivers/net/ethernet/microchip/vcap/vcap_api.c:1239:3-4: Unneeded semicolon drivers/net/ethernet/microchip/vcap/vcap_api.c:1287:3-4: Unneeded semicolon
Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
Changes: V1 -> V2: Target tree included in the subject line.
Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v6.1.28, v6.1.27, v6.1.26, v6.3, v6.1.25, v6.1.24, v6.1.23, v6.1.22, v6.1.21, v6.1.20, v6.1.19, v6.1.18, v6.1.17, v6.1.16 |
|
#
bfcb94aa |
| 07-Mar-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: sparx5: Provide rule count, key removal and keyset select
This provides these 3 functions in the VCAP API:
- Count the number of rules in a VCAP lookup (chain) - Remove a key from a
net: microchip: sparx5: Provide rule count, key removal and keyset select
This provides these 3 functions in the VCAP API:
- Count the number of rules in a VCAP lookup (chain) - Remove a key from a VCAP rule - Find the keyset that gives the smallest rule list from a list of keysets
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v6.1.15, v6.1.14, v6.1.13, v6.2, v6.1.12 |
|
#
0518e914 |
| 14-Feb-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: sparx5: Use chain ids without offsets when enabling rules
This improves the check performed on linked rules when enabling or disabling them. The chain id used must be the chain id w
net: microchip: sparx5: Use chain ids without offsets when enabling rules
This improves the check performed on linked rules when enabling or disabling them. The chain id used must be the chain id without the offset used for linking the rules.
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
#
d7953da4 |
| 14-Feb-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: sparx5: Clear rule counter even if lookup is disabled
The rule counter must be cleared when creating a new rule, even if the VCAP lookup is currently disabled.
This ensures that rul
net: microchip: sparx5: Clear rule counter even if lookup is disabled
The rule counter must be cleared when creating a new rule, even if the VCAP lookup is currently disabled.
This ensures that rules located in VCAPs that use external counters (such as Sparx5 IS2 and ES0) will have their counter reset even if the VCAP lookup is not enabled at the moment.
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Fixes: 95fa74148daa ("net: microchip: sparx5: Reset VCAP counter for new rules") Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
Revision tags: v6.1.11, v6.1.10 |
|
#
6ebf182b |
| 02-Feb-2023 |
Daniel Machon <daniel.machon@microchip.com> |
sparx5: add support for configuring PSFP via tc
Add support for tc actions gate and police, in order to implement support for configuring PSFP through tc.
Signed-off-by: Daniel Machon <daniel.macho
sparx5: add support for configuring PSFP via tc
Add support for tc actions gate and police, in order to implement support for configuring PSFP through tc.
Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v6.1.9 |
|
#
e7e3f514 |
| 27-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: sparx5: Add ingress information to VCAP instance
This allows the check of the goto action to be specific to the ingress and egress VCAP instances.
The debugfs support is also update
net: microchip: sparx5: Add ingress information to VCAP instance
This allows the check of the goto action to be specific to the ingress and egress VCAP instances.
The debugfs support is also updated to show this information.
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
c02b19ed |
| 27-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: sparx5: Add support for getting keysets without a type id
When there is only one keyset available for a certain VCAP rule size, the particular keyset does not need a type id when enc
net: microchip: sparx5: Add support for getting keysets without a type id
When there is only one keyset available for a certain VCAP rule size, the particular keyset does not need a type id when encoded in the VCAP Hardware.
This provides support for getting a keyset from a rule, when this is the case: only one keyset fits this rule size.
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
81e164c4 |
| 24-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: sparx5: Add automatic selection of VCAP rule actionset
With more than one possible actionset in a VCAP instance, the VCAP API will now use the actions in a VCAP rule to select the ac
net: microchip: sparx5: Add automatic selection of VCAP rule actionset
With more than one possible actionset in a VCAP instance, the VCAP API will now use the actions in a VCAP rule to select the actionset that fits these actions the best possible way.
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
#
88bd9ea7 |
| 24-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: sparx5: Add TC filter chaining support for IS0 and IS2 VCAPs
This allows rules to be chained between VCAP instances, e.g. from IS0 Lookup 0 to IS0 Lookup 1, or from one of the IS0 Lo
net: microchip: sparx5: Add TC filter chaining support for IS0 and IS2 VCAPs
This allows rules to be chained between VCAP instances, e.g. from IS0 Lookup 0 to IS0 Lookup 1, or from one of the IS0 Lookups to one of the IS2 Lookups.
Chaining from an IS2 Lookup to another IS2 Lookup is not supported in the hardware.
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
#
7306fcd1 |
| 24-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: sparx5: Add actionset type id information to rule
This adds the actionset type id to the rule information. This is needed as we now have more than one actionset in a VCAP instance (
net: microchip: sparx5: Add actionset type id information to rule
This adds the actionset type id to the rule information. This is needed as we now have more than one actionset in a VCAP instance (IS0).
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
Revision tags: v6.1.8 |
|
#
3bee9b57 |
| 20-Jan-2023 |
Dan Carpenter <error27@gmail.com> |
net: microchip: sparx5: Fix uninitialized variable in vcap_path_exist()
The "eport" variable needs to be initialized to NULL for this code to work.
Fixes: 814e7693207f ("net: microchip: vcap api: A
net: microchip: sparx5: Fix uninitialized variable in vcap_path_exist()
The "eport" variable needs to be initialized to NULL for this code to work.
Fixes: 814e7693207f ("net: microchip: vcap api: Add a storage state to a VCAP rule") Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com> Link: https://lore.kernel.org/r/Y8qbYAb+YSXo1DgR@kili Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
5e64f59a |
| 19-Jan-2023 |
Yang Yingliang <yangyingliang@huawei.com> |
net: microchip: vcap: use kmemdup() to allocate memory
Use kmemdup() helper instead of open-coding to simplify the code when allocating newckf and newcaf.
Generated by: scripts/coccinelle/api/memdu
net: microchip: vcap: use kmemdup() to allocate memory
Use kmemdup() helper instead of open-coding to simplify the code when allocating newckf and newcaf.
Generated by: scripts/coccinelle/api/memdup.cocci
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com> Link: https://lore.kernel.org/r/20230119092210.3607634-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
Revision tags: v6.1.7 |
|
#
1972b6d9 |
| 17-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: sparx5: Improve VCAP admin locking in the VCAP API
This improves the VCAP cache and the VCAP rule list protection against access from different sources.
Signed-off-by: Steen Hegelun
net: microchip: sparx5: Improve VCAP admin locking in the VCAP API
This improves the VCAP cache and the VCAP rule list protection against access from different sources.
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
9579e2c2 |
| 17-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: sparx5: Add VCAP admin locking in debugFS
This ensures that the admin lock is taken before the debugFS functions starts iterating the VCAP rules. It also adds a separate function to
net: microchip: sparx5: Add VCAP admin locking in debugFS
This ensures that the admin lock is taken before the debugFS functions starts iterating the VCAP rules. It also adds a separate function to decode a rule, which expects the lock to have been taken before it is called.
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
975d86ac |
| 17-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: sparx5: Add support to check for existing VCAP rule id
Add a new function that just checks if the VCAP rule id is already used by an existing rule.
Signed-off-by: Steen Hegelund <st
net: microchip: sparx5: Add support to check for existing VCAP rule id
Add a new function that just checks if the VCAP rule id is already used by an existing rule.
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
27d293cc |
| 17-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: sparx5: Add support for rule count by cookie
This adds support for TC clients to get the packet count for a TC filter identified by its cookie.
Signed-off-by: Steen Hegelund <steen.
net: microchip: sparx5: Add support for rule count by cookie
This adds support for TC clients to get the packet count for a TC filter identified by its cookie.
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
18a15c76 |
| 14-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: vcap api: Enable/Disable rules via chains in VCAP HW
This supports that individual rules are enabled and disabled via chain information. This is done by keeping disabled rules in the
net: microchip: vcap api: Enable/Disable rules via chains in VCAP HW
This supports that individual rules are enabled and disabled via chain information. This is done by keeping disabled rules in the VCAP list (cached) until they are enabled, and only at this time are the rules written to the VCAP HW.
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
814e7693 |
| 14-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: vcap api: Add a storage state to a VCAP rule
This allows a VCAP rule to be in one of 3 states:
- permanently stored in the VCAP HW (for rules that must always be present) - enabled
net: microchip: vcap api: Add a storage state to a VCAP rule
This allows a VCAP rule to be in one of 3 states:
- permanently stored in the VCAP HW (for rules that must always be present) - enabled (stored in HW) when the corresponding lookup has been enabled - disabled (stored in SW) when the lookup is disabled
This way important VCAP rules can be added even before the user enables the VCAP lookups using a TC matchall filter.
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
784c3067 |
| 14-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: vcap api: Check chains when adding a tc flower filter
This changes the way the chain information verified when adding a new tc flower filter.
When adding a flower filter it is now c
net: microchip: vcap api: Check chains when adding a tc flower filter
This changes the way the chain information verified when adding a new tc flower filter.
When adding a flower filter it is now checked that the filter contains a goto action to one of the IS2 VCAP lookups, except for the last lookup which may omit this goto action.
It is also checked if you attempt to add multiple matchall filters to enable the same VCAP lookup. This will be rejected.
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
cfd9e7b7 |
| 14-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: vcap api: Use src and dst chain id to chain VCAP lookups
This adds both the source and destination chain id to the information kept for enabled port lookups. This allows enabling and
net: microchip: vcap api: Use src and dst chain id to chain VCAP lookups
This adds both the source and destination chain id to the information kept for enabled port lookups. This allows enabling and disabling a chain of lookups by walking the chain information for a port.
This changes the way that VCAP lookups are enabled from userspace: instead of one matchall rule that enables all the 4 Sparx5 IS2 lookups, you need a matchall rule per lookup.
In practice that is done by adding one matchall rule in chain 0 to goto IS2 Lookup 0, and then for each lookup you add a rule per lookup (low priority) that does a goto to the next lookup chain.
Examples:
If you want IS2 Lookup 0 to be enabled you add the same matchall filter as before:
tc filter add dev eth12 ingress chain 0 prio 1000 handle 1000 matchall \ skip_sw action goto chain 8000000
If you also want to enable lookup 1 to 3 in IS2 and chain them you need to add the following matchall filters:
tc filter add dev eth12 ingress chain 8000000 prio 1000 handle 1000 \ matchall skip_sw action goto chain 8100000
tc filter add dev eth12 ingress chain 8100000 prio 1000 handle 1000 \ matchall skip_sw action goto chain 8200000
tc filter add dev eth12 ingress chain 8200000 prio 1000 handle 1000 \ matchall skip_sw action goto chain 8300000
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
33e3a273 |
| 14-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: vcap api: Convert multi-word keys/actions when encoding
The conversion to the platform specific multi-word format is moved from the key/action add functions to the encoding key/actio
net: microchip: vcap api: Convert multi-word keys/actions when encoding
The conversion to the platform specific multi-word format is moved from the key/action add functions to the encoding key/action. This allows rules that are disabled (not in VCAP HW) to use the same format for keys/actions as rules that have just been read from VCAP HW.
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
01ef75a2 |
| 14-Jan-2023 |
Steen Hegelund <steen.hegelund@microchip.com> |
net: microchip: vcap api: Always enable VCAP lookups
This changes the VCAP lookups state to always be enabled so that it is possible to add "internal" VCAP rules that must be available even though t
net: microchip: vcap api: Always enable VCAP lookups
This changes the VCAP lookups state to always be enabled so that it is possible to add "internal" VCAP rules that must be available even though the user has not yet enabled the VCAP chains via a TC matchall filter.
The API callback to enable and disable VCAP lookups is therefore removed.
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|