|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5 |
|
| #
b81565b7 |
| 19-Apr-2024 |
Alex Elder <[email protected]> |
net: ipa: make ipa_table_hash_support() a real function
With the exception of ipa_table_hash_support(), nothing defined in "ipa_table.h" requires the full definition of the IPA structure.
Change th
net: ipa: make ipa_table_hash_support() a real function
With the exception of ipa_table_hash_support(), nothing defined in "ipa_table.h" requires the full definition of the IPA structure.
Change that function to be a "real" function rather than an inline, to avoid requring the IPA structure to be defined.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
88412277 |
| 16-Apr-2024 |
Alex Elder <[email protected]> |
net: ipa: sort all includes
Establish the rule that header files are always included in sorted (POSIX local) order. Standard and private headers are separated by a blank line.
Similarly, sort all
net: ipa: sort all includes
Establish the rule that header files are always included in sorted (POSIX local) order. Standard and private headers are separated by a blank line.
Similarly, sort all forward-declarations for structures.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
8c044024 |
| 16-Apr-2024 |
Alex Elder <[email protected]> |
net: ipa: remove unneeded standard includes
Some IPA header files include one or more other standard header files despite not directly needing anything defined in the included files. Remove these u
net: ipa: remove unneeded standard includes
Some IPA header files include one or more other standard header files despite not directly needing anything defined in the included files. Remove these unnecessary includes.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7 |
|
| #
5245f4fd |
| 01-Mar-2024 |
Alex Elder <[email protected]> |
net: ipa: don't save the platform device
The IPA platform device is now only used as the structure containing the IPA device structure. Replace the platform device pointer with a pointer to the dev
net: ipa: don't save the platform device
The IPA platform device is now only used as the structure containing the IPA device structure. Replace the platform device pointer with a pointer to the device structure.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4 |
|
| #
e11ec2b8 |
| 24-Jul-2023 |
Alex Elder <[email protected]> |
net: ipa: only reset hashed tables when supported
Last year, the code that manages GSI channel transactions switched from using spinlock-protected linked lists to using indexes into the ring buffer
net: ipa: only reset hashed tables when supported
Last year, the code that manages GSI channel transactions switched from using spinlock-protected linked lists to using indexes into the ring buffer used for a channel. Recently, Google reported seeing transaction reference count underflows occasionally during shutdown.
Doug Anderson found a way to reproduce the issue reliably, and bisected the issue to the commit that eliminated the linked lists and the lock. The root cause was ultimately determined to be related to unused transactions being committed as part of the modem shutdown cleanup activity. Unused transactions are not normally expected (except in error cases).
The modem uses some ranges of IPA-resident memory, and whenever it shuts down we zero those ranges. In ipa_filter_reset_table() a transaction is allocated to zero modem filter table entries. If hashing is not supported, hashed table memory should not be zeroed. But currently nothing prevents that, and the result is an unused transaction. Something similar occurs when we zero routing table entries for the modem.
By preventing any attempt to clear hashed tables when hashing is not supported, the reference count underflow is avoided in this case.
Note that there likely remains an issue with properly freeing unused transactions (if they occur due to errors). This patch addresses only the underflows that Google originally reported.
Cc: <[email protected]> # 6.1.x Fixes: d338ae28d8a8 ("net: ipa: kill all other transaction lists") Tested-by: Douglas Anderson <[email protected]> Signed-off-by: Alex Elder <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8 |
|
| #
f1470fd7 |
| 08-Feb-2023 |
Alex Elder <[email protected]> |
net: ipa: generalize register field functions
Rename functions related to register fields so they don't appear to be IPA-specific, and move their definitions into "reg.h": ipa_reg_fmask() -> reg
net: ipa: generalize register field functions
Rename functions related to register fields so they don't appear to be IPA-specific, and move their definitions into "reg.h": ipa_reg_fmask() -> reg_fmask() ipa_reg_bit() -> reg_bit() ipa_reg_field_max() -> reg_field_max() ipa_reg_encode() -> reg_encode() ipa_reg_decode() -> reg_decode()
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
fc4cecf7 |
| 08-Feb-2023 |
Alex Elder <[email protected]> |
net: ipa: generalize register offset functions
Rename ipa_reg_offset() to be reg_offset() and move its definition to "reg.h". Rename ipa_reg_n_offset() to be reg_n_offset() also.
Signed-off-by: Al
net: ipa: generalize register offset functions
Rename ipa_reg_offset() to be reg_offset() and move its definition to "reg.h". Rename ipa_reg_n_offset() to be reg_n_offset() also.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
81772e44 |
| 08-Feb-2023 |
Alex Elder <[email protected]> |
net: ipa: start generalizing "ipa_reg"
IPA register definitions have evolved with each new version. The changes required to support more than 32 endpoints in IPA v5.0 made it best to define a unifi
net: ipa: start generalizing "ipa_reg"
IPA register definitions have evolved with each new version. The changes required to support more than 32 endpoints in IPA v5.0 made it best to define a unified mechanism for defining registers and their fields.
GSI register definitions, meanwhile, have remained fairly stable. And even as the total number of IPA endpoints goes beyond 32, the number of GSI channels on a given EE that underly endpoints still remains 32 or less.
Despite that, GSI v3.0 (which is used with IPA v5.0) extends the number of channels (and events) it supports to be about 256, and as a result, many GSI register definitions must change significantly. To address this, we'll use the same "ipa_reg" mechanism to define the GSI registers.
As a first step in generalizing the "ipa_reg" to also support GSI registers, isolate the definitions of the "ipa_reg" and "ipa_regs" structure types (and some supporting macros) into a new header file, and remove the "ipa_" and "IPA_" from symbol names.
Separate the IPA register ID validity checking from the generic check that a register ID is in range. Aside from that, this is intended to have no functional effect on the code.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v6.2-rc7 |
|
| #
a08cedc3 |
| 30-Jan-2023 |
Alex Elder <[email protected]> |
net: ipa: support zeroing new cache tables
IPA v5.0+ separates the configuration of entries in the cached (previously "hashed") routing and filtering tables into distinct registers. Previously a si
net: ipa: support zeroing new cache tables
IPA v5.0+ separates the configuration of entries in the cached (previously "hashed") routing and filtering tables into distinct registers. Previously a single "filter and router" register updated entries in both tables at once; now the routing and filter table caches have separate registers that define their content.
This patch updates the code that zeroes entries in the cached filter and router tables to support IPA versions including v5.0+.
Signed-off-by: Alex Elder <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
8e7c89d8 |
| 30-Jan-2023 |
Alex Elder <[email protected]> |
net: ipa: update table cache flushing
Update the code that causes filter and router table caches to be flushed so that it supports IPA versions 5.0+. It adds a comment in ipa_hardware_config_hashin
net: ipa: update table cache flushing
Update the code that causes filter and router table caches to be flushed so that it supports IPA versions 5.0+. It adds a comment in ipa_hardware_config_hashing() that explains that cacheing does not need to be enabled, just as before, because it's enabled by default. (For the record, the FILT_ROUT_CACHE_CFG register would have been used if we wanted to explicitly enable these.)
Signed-off-by: Alex Elder <[email protected]> Reviewed-by: Leon Romanovsky <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6 |
|
| #
15b4f993 |
| 16-Nov-2022 |
Alex Elder <[email protected]> |
net: ipa: avoid a null pointer dereference
Dan Carpenter reported that Smatch found an instance where a pointer which had previously been assumed could be null (as indicated by a null check) was lat
net: ipa: avoid a null pointer dereference
Dan Carpenter reported that Smatch found an instance where a pointer which had previously been assumed could be null (as indicated by a null check) was later dereferenced without a similar check.
In practice this doesn't lead to a problem because currently the pointers used are all non-null. Nevertheless this patch addresses the reported problem.
In addition, I spotted another bug that arose in the same commit. When the command to initialize a routing table memory region was added, the number of entries computed for the non-hashed table was wrong (it ended up being a Boolean rather than the count intended). This bug is fixed here as well.
Reported-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/kernel-janitors/Y3OOP9dXK6oEydkf@kili Tested-by: Caleb Connolly <[email protected]> Fixes: 5cb76899fb47 ("net: ipa: reduce arguments to ipa_table_init_add()") Signed-off-by: Alex Elder <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v6.1-rc5, v6.1-rc4 |
|
| #
0f97fbd4 |
| 02-Nov-2022 |
Alex Elder <[email protected]> |
net: ipa: support more filtering endpoints
Prior to IPA v5.0, there could be no more than 32 endpoints.
A filter table begins with a bitmap indicating which endpoints have a filter defined. That b
net: ipa: support more filtering endpoints
Prior to IPA v5.0, there could be no more than 32 endpoints.
A filter table begins with a bitmap indicating which endpoints have a filter defined. That bitmap is currently assumed to fit in a 32-bit value.
Starting with IPA v5.0, more than 32 endpoints are supported, so it's conceivable that a TX endpoint has an ID that exceeds 32. Increase the size of the field representing endpoints that support filtering to 64 bits. Rename the bitmap field "filtered".
Unlike other similar fields, we do not use an (arbitrarily long) Linux bitmap for this purpose. The reason is that if a filter table ever *did* need to support more than 64 TX endpoints, its format would change in ways we can't anticipate.
Have ipa_endpoint_init() return a negative errno rather than a mask that indicates which endpoints support filtering, and have that function assign the "filtered" field directly.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
6337b147 |
| 02-Nov-2022 |
Alex Elder <[email protected]> |
net: ipa: use ipa_table_mem() in ipa_table_reset_add()
Similar to the previous commit, pass flags rather than a memory region ID to ipa_table_reset_add(), and there use ipa_table_mem() to look up th
net: ipa: use ipa_table_mem() in ipa_table_reset_add()
Similar to the previous commit, pass flags rather than a memory region ID to ipa_table_reset_add(), and there use ipa_table_mem() to look up the memory region affected based on those flags.
Currently all eight of these table memory regions are assumed to exist, because they all have canaries within them. Stop assuming that will always be the case, and in ipa_table_reset_add() allow these memory regions to be non-existent.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
| #
5cb76899 |
| 02-Nov-2022 |
Alex Elder <[email protected]> |
net: ipa: reduce arguments to ipa_table_init_add()
Recently ipa_table_mem() was added as a way to look up one of 8 possible memory regions by indicating whether it was a filter or route table, hashe
net: ipa: reduce arguments to ipa_table_init_add()
Recently ipa_table_mem() was added as a way to look up one of 8 possible memory regions by indicating whether it was a filter or route table, hashed or not, and IPv6 or not.
We can simplify the interface to ipa_table_init_add() by passing two flags to it instead of the opcode and both hashed and non-hashed memory region IDs. The "filter" and "ipv6" flags are sufficient to determine the opcode to use, and with ipa_table_mem() can look up the correct memory region as well.
It's possible to not have hashed tables, but we already verify the number of entries in a filter or routing table is nonzero. Stop assuming a hashed table entry exists in ipa_table_init_add().
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v6.1-rc3 |
|
| #
bd552493 |
| 27-Oct-2022 |
Alex Elder <[email protected]> |
net: ipa: no more global filtering starting with IPA v5.0
IPA v5.0 eliminates the global filter table entry. As a result, there is no need to shift the filtered endpoint bitmap when it is written t
net: ipa: no more global filtering starting with IPA v5.0
IPA v5.0 eliminates the global filter table entry. As a result, there is no need to shift the filtered endpoint bitmap when it is written to IPA local memory.
Update comments to explain this. Also delete a redundant block of comments above the function.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
f787d848 |
| 25-Oct-2022 |
Alex Elder <[email protected]> |
net: ipa: determine filter table size from memory region
Currently we assume that any filter table contains a fixed number of entries. Like routing tables, the number of entries in a filter table i
net: ipa: determine filter table size from memory region
Currently we assume that any filter table contains a fixed number of entries. Like routing tables, the number of entries in a filter table is limited only by the size of the IPA-local memory region used to hold the table.
Stop assuming that a filter table has exactly 14 entries. Instead, determine the number of entries in a routing table by dividing its memory region size by the size of an entry. (Note that the first "entry" in a filter table contains an endpoint bitmap.)
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
8defab8b |
| 25-Oct-2022 |
Alex Elder <[email protected]> |
net: ipa: don't assume 8 modem routing table entries
Currently all platforms are assumed allot 8 routing table entries for use by the modem. Instead, add a new configuration data entry that defines
net: ipa: don't assume 8 modem routing table entries
Currently all platforms are assumed allot 8 routing table entries for use by the modem. Instead, add a new configuration data entry that defines the number of modem routing table entries, and record that in the IPA structure.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
0439e674 |
| 25-Oct-2022 |
Alex Elder <[email protected]> |
net: ipa: determine route table size from memory region
Currently we assume that any routing table contains a fixed number of entries. The number of entries in a routing table can actually vary, de
net: ipa: determine route table size from memory region
Currently we assume that any routing table contains a fixed number of entries. The number of entries in a routing table can actually vary, depending only on the size of the IPA-local memory region used to hold the table.
Stop assuming that a routing table has exactly 15 entries. Instead, determine the number of entries in a routing table by dividing its memory region size by the size of an entry.
The number of entries is computed early, when ipa_table_mem_valid() is called by ipa_table_init().
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
fc094058 |
| 25-Oct-2022 |
Alex Elder <[email protected]> |
net: ipa: record the route table size in the IPA structure
The non-hashed routing tables for IPv4 and IPv6 will be the same size. And if supported, the hashed routing tables will be the same size a
net: ipa: record the route table size in the IPA structure
The non-hashed routing tables for IPv4 and IPv6 will be the same size. And if supported, the hashed routing tables will be the same size as the non-hashed tables.
Record the size (number of entries) of all routing tables in the IPA structure. For now, initialize this field using IPA_ROUTE_TABLE_MAX, and just do so when the first route table is validated.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v6.1-rc2 |
|
| #
73da9cac |
| 21-Oct-2022 |
Alex Elder <[email protected]> |
net: ipa: check table memory regions earlier
Verify that the sizes of the routing and filter table memory regions are valid as part of memory initialization, rather than waiting for table initializa
net: ipa: check table memory regions earlier
Verify that the sizes of the routing and filter table memory regions are valid as part of memory initialization, rather than waiting for table initialization. The main reason to do this is that upcoming patches use these memory region sizes to determine the number of entries in these tables, and we'll want to know these sizes are good sooner.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
39ad8152 |
| 21-Oct-2022 |
Alex Elder <[email protected]> |
net: ipa: kill ipa_table_valid()
What ipa_table_valid() (and ipa_table_valid_one(), which it calls) does is ensure that the memory regions that hold routing and filter tables have reasonable size.
net: ipa: kill ipa_table_valid()
What ipa_table_valid() (and ipa_table_valid_one(), which it calls) does is ensure that the memory regions that hold routing and filter tables have reasonable size. Specifically, it checks that the size of a region is sufficient (or rather, exactly the right size) to hold the maximum number of entries supported by the driver. (There is an additional check that's erroneous, but in practice it is never reached.)
Recently ipa_table_mem_valid() was added, which is called by ipa_table_init(). That function verifies that all table memory regions are of sufficient size, and requires hashed tables to have zero size if hashing is not supported. It only ensures the filter table is large enough to hold the number of endpoints that support filtering, but that is adequate.
Therefore everything that ipa_table_valid() does is redundant, so get rid of it.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
5444b0ea |
| 21-Oct-2022 |
Alex Elder <[email protected]> |
net: ipa: verify table sizes fit in commands early
We currently verify the table size and offset fit in the immediate command fields that must encode them in ipa_table_valid_one(). We can now make
net: ipa: verify table sizes fit in commands early
We currently verify the table size and offset fit in the immediate command fields that must encode them in ipa_table_valid_one(). We can now make this check earlier, in ipa_table_mem_valid().
The non-hashed IPv4 filter and route tables will always exist, and their sizes will match the IPv6 tables, as well as the hashed tables (if supported). So it's sufficient to verify the offset and size of the IPv4 non-hashed tables fit into these fields.
Rename the function ipa_cmd_table_init_valid(), to reinforce that it is the TABLE_INIT immediate command fields we're checking.
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
cf139196 |
| 21-Oct-2022 |
Alex Elder <[email protected]> |
net: ipa: validate IPA table memory earlier
Add checks in ipa_table_init() to ensure the memory regions defined for IPA filter and routing tables are valid.
For routing tables, the checks ensure:
net: ipa: validate IPA table memory earlier
Add checks in ipa_table_init() to ensure the memory regions defined for IPA filter and routing tables are valid.
For routing tables, the checks ensure: - The non-hashed IPv4 and IPv6 routing tables are defined - The non-hashed IPv4 and IPv6 routing tables are the same size - The number entries in the non-hashed IPv4 routing table is enough to hold the number entries available to the modem, plus at least one usable by the AP.
For filter tables, the checks ensure: - The non-hashed IPv4 and IPv6 filter tables are defined - The non-hashed IPv4 and IPv6 filter tables are the same size - The number entries in the non-hashed IPv4 filter table is enough to hold the endpoint bitmap, plus an entry for each defined endpoint that supports filtering.
In addition, for both routing and filter tables: - If hashing isn't supported (IPA v4.2), hashed tables are zero size - If hashing *is* supported, all hashed tables are the same size as their non-hashed counterparts.
When validating the size of routing tables, require the AP to have at least one entry (in addition to those used by the modem).
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
| #
fb4014ac |
| 21-Oct-2022 |
Alex Elder <[email protected]> |
net: ipa: kill two constant symbols
The entries in each IPA routing table are divided between the modem and the AP. The modem always gets some number of entries located at the base of the table; th
net: ipa: kill two constant symbols
The entries in each IPA routing table are divided between the modem and the AP. The modem always gets some number of entries located at the base of the table; the AP gets all those that follow.
There's no reason to think the modem will use anything different from the first entries in a routing table, so: - Get rid of IPA_ROUTE_MODEM_MIN (just assume it's 0) - Get rid of IPA_ROUTE_AP_MIN (just assume it's IPA_ROUTE_MODEM_COUNT) And finally: - Open-code IPA_ROUTE_AP_COUNT and remove its definition
Signed-off-by: Alex Elder <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
show more ...
|
|
Revision tags: v6.1-rc1, v6.0 |
|
| #
a4388da5 |
| 30-Sep-2022 |
Alex Elder <[email protected]> |
net: ipa: update copyrights
Some source files state copyright dates that are earlier than the last modification of the file. Change the copyright year to 2022 in all such cases.
Signed-off-by: Ale
net: ipa: update copyrights
Some source files state copyright dates that are earlier than the last modification of the file. Change the copyright year to 2022 in all such cases.
Signed-off-by: Alex Elder <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|