#
74ce94ac |
| 29-Aug-2024 |
Shen Lichuan <shenlichuan@vivo.com> |
sfc: Convert to use ERR_CAST()
As opposed to open-code, using the ERR_CAST macro clearly indicates that this is a pointer to an error value and a type conversion was performed.
Signed-off-by: Shen
sfc: Convert to use ERR_CAST()
As opposed to open-code, using the ERR_CAST macro clearly indicates that this is a pointer to an error value and a type conversion was performed.
Signed-off-by: Shen Lichuan <shenlichuan@vivo.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Martin Habets <habetsm.xilinx@gmail.com> Reviewed-by: Edward Cree <ecree.xilinx@gmail.com> Link: https://patch.msgid.link/20240829021253.3066-1-shenlichuan@vivo.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
fc21f083 |
| 19-Sep-2023 |
Edward Cree <ecree.xilinx@gmail.com> |
sfc: handle error pointers returned by rhashtable_lookup_get_insert_fast()
Several places in TC offload code assumed that the return from rhashtable_lookup_get_insert_fast() was always either NULL
sfc: handle error pointers returned by rhashtable_lookup_get_insert_fast()
Several places in TC offload code assumed that the return from rhashtable_lookup_get_insert_fast() was always either NULL or a valid pointer to an existing entry, but in fact that function can return an error pointer. In that case, perform the usual cleanup of the newly created entry, then pass up the error, rather than attempting to take a reference on the old entry.
Fixes: d902e1a737d4 ("sfc: bare bones TC offload on EF100") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Link: https://lore.kernel.org/r/20230919183949.59392-1-edward.cree@amd.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
#
1909387f |
| 07-Aug-2023 |
Edward Cree <ecree.xilinx@gmail.com> |
sfc: offload conntrack flow entries (match only) from CT zones
No handling yet for FLOW_ACTION_MANGLE (NAT or NAPT) actions.
Reviewed-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
sfc: offload conntrack flow entries (match only) from CT zones
No handling yet for FLOW_ACTION_MANGLE (NAT or NAPT) actions.
Reviewed-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
9a14f2e3 |
| 21-Jun-2023 |
Edward Cree <ecree.xilinx@gmail.com> |
sfc: keep alive neighbour entries while a TC encap action is using them
When processing counter updates, if any action set using the newly incremented counter includes an encap action, prod the cor
sfc: keep alive neighbour entries while a TC encap action is using them
When processing counter updates, if any action set using the newly incremented counter includes an encap action, prod the corresponding neighbouring entry to indicate to the neighbour cache that the entry is still in use and passing traffic.
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Link: https://lore.kernel.org/r/20230621121504.17004-1-edward.cree@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
e80bd08f |
| 21-Nov-2022 |
Edward Cree <ecree.xilinx@gmail.com> |
sfc: ensure type is valid before updating seen_gen
In the case of invalid or corrupted v2 counter update packets, efx_tc_rx_version_2() returns EFX_TC_COUNTER_TYPE_MAX. In this case we should not
sfc: ensure type is valid before updating seen_gen
In the case of invalid or corrupted v2 counter update packets, efx_tc_rx_version_2() returns EFX_TC_COUNTER_TYPE_MAX. In this case we should not attempt to update generation counts as this will write beyond the end of the seen_gen array.
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org> Addresses-Coverity-ID: 1527356 ("Memory - illegal accesses") Fixes: 25730d8be5d8 ("sfc: add extra RX channel to receive MAE counter updates on ef100") Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
50f8f2f7 |
| 14-Nov-2022 |
Edward Cree <ecree.xilinx@gmail.com> |
sfc: implement counters readout to TC stats
On FLOW_CLS_STATS, look up the MAE counter by TC cookie, and report the change in packet and byte count since the last time FLOW_CLS_STATS read them.
S
sfc: implement counters readout to TC stats
On FLOW_CLS_STATS, look up the MAE counter by TC cookie, and report the change in packet and byte count since the last time FLOW_CLS_STATS read them.
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
c4bad432 |
| 14-Nov-2022 |
Edward Cree <ecree.xilinx@gmail.com> |
sfc: accumulate MAE counter values from update packets
Add the packet and byte counts to the software running total, and store the latest jiffies every time the counter is bumped.
Signed-off-by: E
sfc: accumulate MAE counter values from update packets
Add the packet and byte counts to the software running total, and store the latest jiffies every time the counter is bumped.
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
0363aa29 |
| 14-Nov-2022 |
Edward Cree <ecree.xilinx@gmail.com> |
sfc: add functions to allocate/free MAE counters
efx_tc_flower_get_counter_index() will create an MAE counter mapped to the passed (TC filter) cookie, or increment the reference if one already exi
sfc: add functions to allocate/free MAE counters
efx_tc_flower_get_counter_index() will create an MAE counter mapped to the passed (TC filter) cookie, or increment the reference if one already exists for that cookie.
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
19a0c989 |
| 14-Nov-2022 |
Edward Cree <ecree.xilinx@gmail.com> |
sfc: add hashtables for MAE counters and counter ID mappings
Nothing populates them yet.
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
25730d8b |
| 14-Nov-2022 |
Edward Cree <ecree.xilinx@gmail.com> |
sfc: add extra RX channel to receive MAE counter updates on ef100
Currently there is no counter-allocating machinery to connect the resulting counter update values to; that will be added in a subs
sfc: add extra RX channel to receive MAE counter updates on ef100
Currently there is no counter-allocating machinery to connect the resulting counter update values to; that will be added in a subsequent patch.
Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|