<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/ethernet/microchip/vcap/vcap_api.c, branch linux-7.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-02-22T01:09:51+00:00</updated>
<entry>
<title>Convert 'alloc_obj' family to use the new default GFP_KERNEL argument</title>
<updated>2026-02-22T01:09:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-22T00:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43'/>
<id>urn:sha1:bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43</id>
<content type='text'>
This was done entirely with mindless brute force, using

    git grep -l '\&lt;k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
        xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'

to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.

Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.

For the same reason the 'flex' versions will be done as a separate
conversion.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: sparx5: Correct spelling in comments</title>
<updated>2024-04-26T02:13:26+00:00</updated>
<author>
<name>Simon Horman</name>
<email>horms@kernel.org</email>
</author>
<published>2024-04-24T15:13:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d896a374378a2df373e855111434bbe2b3c521da'/>
<id>urn:sha1:d896a374378a2df373e855111434bbe2b3c521da</id>
<content type='text'>
Correct spelling in comments, as flagged by codespell.

Signed-off-by: Simon Horman &lt;horms@kernel.org&gt;
Reviewed-by: Daniel Machon &lt;daniel.machon@microchip.com&gt;
Link: https://lore.kernel.org/r/20240424-lan743x-confirm-v2-4-f0480542e39f@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: sparx5: add support for tc flower mirred action.</title>
<updated>2024-04-09T08:45:10+00:00</updated>
<author>
<name>Daniel Machon</name>
<email>daniel.machon@microchip.com</email>
</author>
<published>2024-04-05T07:44:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=48ba00da2eb4b54a7e6ed2ca3a9f2e575dff48c9'/>
<id>urn:sha1:48ba00da2eb4b54a7e6ed2ca3a9f2e575dff48c9</id>
<content type='text'>
Add support for tc flower mirred action. Two VCAP actions are encoded in
the rule - one for the port mask, and one for the port mask mode. When
the rule is hit, the destination mask is OR'ed with the port mask.

Also add new VCAP function for supporting 72-bit wide actions, and a tc
helper for setting the port forwarding mask.

Signed-off-by: Daniel Machon &lt;daniel.machon@microchip.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: microchip: vcap api: Fix possible memory leak for vcap_dup_rule()</title>
<updated>2023-09-10T17:51:42+00:00</updated>
<author>
<name>Jinjie Ruan</name>
<email>ruanjinjie@huawei.com</email>
</author>
<published>2023-09-07T14:03:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=281f65d29d6da1a9b6907fb0b145aaf34f4e4822'/>
<id>urn:sha1:281f65d29d6da1a9b6907fb0b145aaf34f4e4822</id>
<content type='text'>
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:
    [&lt;00000000394b0db8&gt;] __kmem_cache_alloc_node+0x274/0x2f8
    [&lt;0000000001bedc67&gt;] kmalloc_trace+0x38/0x88
    [&lt;00000000b0612f98&gt;] vcap_dup_rule+0x50/0x460
    [&lt;000000005d2d3aca&gt;] vcap_add_rule+0x8cc/0x1038
    [&lt;00000000eef9d0f8&gt;] test_vcap_xn_rule_creator.constprop.0.isra.0+0x238/0x494
    [&lt;00000000cbda607b&gt;] vcap_api_rule_remove_in_front_test+0x1ac/0x698
    [&lt;00000000c8766299&gt;] kunit_try_run_case+0xe0/0x20c
    [&lt;00000000c4fe9186&gt;] kunit_generic_run_threadfn_adapter+0x50/0x94
    [&lt;00000000f6864acf&gt;] kthread+0x2e8/0x374
    [&lt;0000000022e639b3&gt;] ret_from_fork+0x10/0x20

Fixes: 814e7693207f ("net: microchip: vcap api: Add a storage state to a VCAP rule")
Signed-off-by: Jinjie Ruan &lt;ruanjinjie@huawei.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: microchip: vcap api: Always return ERR_PTR for vcap_get_rule()</title>
<updated>2023-08-19T18:29:23+00:00</updated>
<author>
<name>Ruan Jinjie</name>
<email>ruanjinjie@huawei.com</email>
</author>
<published>2023-08-18T05:05:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=093db9cda7b695f963cd7b468ed1488063548ce2'/>
<id>urn:sha1:093db9cda7b695f963cd7b468ed1488063548ce2</id>
<content type='text'>
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 &lt;ruanjinjie@huawei.com&gt;
Suggested-by: Simon Horman &lt;horms@kernel.org&gt;
Reviewed-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: microchip: vcap api: Use ERR_CAST() in vcap_decode_rule()</title>
<updated>2023-08-04T08:00:23+00:00</updated>
<author>
<name>Li Zetao</name>
<email>lizetao1@huawei.com</email>
</author>
<published>2023-08-02T09:31:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=58e701264f15a8984136f4997faf99cb22b121f3'/>
<id>urn:sha1:58e701264f15a8984136f4997faf99cb22b121f3</id>
<content type='text'>
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 &lt;lizetao1@huawei.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ethernet: microchip: vcap: Remove extra semicolon</title>
<updated>2023-05-15T09:16:50+00:00</updated>
<author>
<name>Anup Sharma</name>
<email>anupnewsmail@gmail.com</email>
</author>
<published>2023-05-13T11:06:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c515a4443cb8c8802751223b13855d1575db8cad'/>
<id>urn:sha1:c515a4443cb8c8802751223b13855d1575db8cad</id>
<content type='text'>
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 &lt;anupnewsmail@gmail.com&gt;

Changes:
V1 -&gt; V2: Target tree included in the subject line.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: microchip: sparx5: Provide rule count, key removal and keyset select</title>
<updated>2023-03-08T13:19:43+00:00</updated>
<author>
<name>Steen Hegelund</name>
<email>steen.hegelund@microchip.com</email>
</author>
<published>2023-03-07T13:41:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bfcb94aacc92f7025bd86a545037e5eb8db00e32'/>
<id>urn:sha1:bfcb94aacc92f7025bd86a545037e5eb8db00e32</id>
<content type='text'>
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 &lt;steen.hegelund@microchip.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: microchip: sparx5: Use chain ids without offsets when enabling rules</title>
<updated>2023-02-16T07:59:48+00:00</updated>
<author>
<name>Steen Hegelund</name>
<email>steen.hegelund@microchip.com</email>
</author>
<published>2023-02-14T10:40:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0518e914f34ae539a1a6f4a19ead3b1d5d9881f4'/>
<id>urn:sha1:0518e914f34ae539a1a6f4a19ead3b1d5d9881f4</id>
<content type='text'>
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 &lt;steen.hegelund@microchip.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
</feed>
