net: ipa: support variable RX buffer size
cover net: ipa: support variable RX buffer size
Specify the size of receive buffers used for RX endpoints in the configuration data, rather than using 8192 bytes for all of them. Increase the size of the AP receive buffer for the modem to 32KB.
-Alex
Alex Elder (2):
net: ipa: define per-endpoint receive buffer size
net: ipa: set IPA v4.11 AP<-modem RX buffer size to 32KB
drivers/net/ipa/ipa_data-v3.1.c | 2 + drivers/net/ipa/ipa_data-v3.5.1.c | 2 + drivers/net/ipa/ipa_data-v4.11.c | 2 + drivers/net/ipa/ipa_data-v4.2.c | 2 + drivers/net/ipa/ipa_data-v4.5.c | 2 + drivers/net/ipa/ipa_data-v4.9.c | 2 + drivers/net/ipa/ipa_data.h | 2 + drivers/net/ipa/ipa_endpoint.c | 107 ++++++++++++++++++------------ 8 files changed, 79 insertions(+), 42 deletions(-)
Signature · 1 line
2.32.0
PATCH 1/2 net: ipa: define per-endpoint receive buffer size
Allow RX endpoints to have differing receive buffer sizes. Define the receive buffer size in the configuration data, and use that rather than IPA_RX_BUFFER_SIZE when configuring the endpoint.
Add verification in ipa_endpoint_data_valid_one() that the receive buffer specified for AP RX endpoints is both big enough to handle at least one full packet, and not so big in an aggregating endpoint that its size can't be represented when programming the hardware. Move aggr_byte_limit_max() up in "ipa_endpoint.c" so it can be used earlier in the file without a forward-reference.
Initially we'll just keep the 8KB receive buffer size already in use for all AP RX endpoints..
--- drivers/net/ipa/ipa_data-v3.1.c | 2 + drivers/net/ipa/ipa_data-v3.5.1.c | 2 + drivers/net/ipa/ipa_data-v4.11.c | 2 + drivers/net/ipa/ipa_data-v4.2.c | 2 + drivers/net/ipa/ipa_data-v4.5.c | 2 + drivers/net/ipa/ipa_data-v4.9.c | 2 + drivers/net/ipa/ipa_data.h | 2 + drivers/net/ipa/ipa_endpoint.c | 107 ++++++++++++++++++------------ 8 files changed, 79 insertions(+), 42 deletions(-)
drivers/net/ipa/ipa_data-v3.1.c +2 -0
@@ -101,6 +101,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .aggregation = true, .status_enable = true, .rx = { + .buffer_size = 8192, .pad_align = ilog2(sizeof(u32)), }, },
@@ -148,6 +149,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .qmap = true, .aggregation = true, .rx = { + .buffer_size = 8192, .aggr_close_eof = true, }, },
drivers/net/ipa/ipa_data-v3.5.1.c +2 -0
@@ -92,6 +92,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .aggregation = true, .status_enable = true, .rx = { + .buffer_size = 8192, .pad_align = ilog2(sizeof(u32)), }, },
@@ -140,6 +141,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .qmap = true, .aggregation = true, .rx = { + .buffer_size = 8192, .aggr_close_eof = true, }, },
drivers/net/ipa/ipa_data-v4.11.c +2 -0
@@ -86,6 +86,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .aggregation = true, .status_enable = true, .rx = { + .buffer_size = 8192, .pad_align = ilog2(sizeof(u32)), }, },
@@ -133,6 +134,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .qmap = true, .aggregation = true, .rx = { + .buffer_size = 8192, .aggr_close_eof = true, }, },
drivers/net/ipa/ipa_data-v4.2.c +2 -0
@@ -82,6 +82,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .aggregation = true, .status_enable = true, .rx = { + .buffer_size = 8192, .pad_align = ilog2(sizeof(u32)), }, },
@@ -130,6 +131,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .qmap = true, .aggregation = true, .rx = { + .buffer_size = 8192, .aggr_close_eof = true, }, },
drivers/net/ipa/ipa_data-v4.5.c +2 -0
@@ -95,6 +95,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .aggregation = true, .status_enable = true, .rx = { + .buffer_size = 8192, .pad_align = ilog2(sizeof(u32)), }, },
@@ -142,6 +143,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .qmap = true, .aggregation = true, .rx = { + .buffer_size = 8192, .aggr_close_eof = true, }, },
drivers/net/ipa/ipa_data-v4.9.c +2 -0
@@ -87,6 +87,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .aggregation = true, .status_enable = true, .rx = { + .buffer_size = 8192, .pad_align = ilog2(sizeof(u32)), }, },
@@ -134,6 +135,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .qmap = true, .aggregation = true, .rx = { + .buffer_size = 8192, .aggr_close_eof = true, }, },
drivers/net/ipa/ipa_data.h +2 -0
@@ -112,6 +112,7 @@ struct ipa_endpoint_tx_data {/** * struct ipa_endpoint_rx_data - configuration data for RX endpoints +* @buffer_size: requested receive buffer size (bytes) * @pad_align: power-of-2 boundary to which packet payload is aligned * @aggr_close_eof: whether aggregation closes on end-of-frame *
@@ -125,6 +126,7 @@ struct ipa_endpoint_tx_data {* a "frame" consisting of several transfers has ended. */ struct ipa_endpoint_rx_data { +u32 buffer_size;u32 pad_align;bool aggr_close_eof; };
drivers/net/ipa/ipa_endpoint.c +65 -42
215 lines not on this page · raw message
Signature · 1 line
2.32.0
PATCH 2/2 net: ipa: set IPA v4.11 AP<-modem RX buffer size to 32KB
In reply to Alex ElderIncrease the receive buffer size used for data received from the modem to 32KB, to improve download performance by allowing much greater aggregation.
--- drivers/net/ipa/ipa_data-v4.11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ipa/ipa_data-v4.11.c +1 -1
@@ -134,7 +134,7 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = { .qmap = true, .aggregation = true, .rx = { - .buffer_size = 8192, + .buffer_size = 32768, .aggr_close_eof = true, }, },
Signature · 1 line
2.32.0
This series was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Tue, 1 Feb 2022 09:37:35 -0600 you wrote:
Specify the size of receive buffers used for RX endpoints in the configuration data, rather than using 8192 bytes for all of them. Increase the size of the AP receive buffer for the modem to 32KB.
-Alex
Alex Elder (2):
net: ipa: define per-endpoint receive buffer size
net: ipa: set IPA v4.11 AP<-modem RX buffer size to 32KB[...]
Here is the summary with links:
- [net-next,1/2] net: ipa: define per-endpoint receive buffer size
https://git.kernel.org/netdev/net-next/c/ed23f02680ca - [net-next,2/2] net: ipa: set IPA v4.11 AP<-modem RX buffer size to 32KB https://git.kernel.org/netdev/net-next/c/33230aeb2ef4
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html