net: ipa: support two more platforms
Subsystems (5)
cover net: ipa: support two more platforms
This series adds IPA support for two more Qualcomm SoCs.
The first patch updates the DT binding to add compatible strings.
The second temporarily disables checksum offload support for IPA version 4.5 and above. Changes are required to the RMNet driver to support the "inline" checksum offload used for IPA v4.5+, and once those are present this capability will be enabled for IPA.
The third and fourth patches add configuration data for IPA versions 4.5 (used for the SDX55 SoC) and 4.11 (used for the SD7280 SoC).
-Alex
Alex Elder (4):
dt-bindings: net: qcom,ipa: add some compatible strings
net: ipa: disable checksum offload for IPA v4.5+
net: ipa: add IPA v4.5 configuration data
net: ipa: add IPA v4.11 configuration data
.../devicetree/bindings/net/qcom,ipa.yaml | 6 +- drivers/net/ipa/Makefile | 3 +- drivers/net/ipa/ipa_data-v4.11.c | 382 +++++++++++++++ drivers/net/ipa/ipa_data-v4.5.c | 437 ++++++++++++++++++ drivers/net/ipa/ipa_data.h | 2 + drivers/net/ipa/ipa_endpoint.c | 16 + drivers/net/ipa/ipa_main.c | 8 + drivers/net/ipa/ipa_mem.h | 6 +- 8 files changed, 855 insertions(+), 5 deletions(-) create mode 100644 drivers/net/ipa/ipa_data-v4.11.c create mode 100644 drivers/net/ipa/ipa_data-v4.5.c
Signature · 1 line
2.27.0
PATCH 1/4 dt-bindings: net: qcom,ipa: add some compatible strings
Add existing supported platform "qcom,sc7180-ipa" to the set of IPA compatible strings. Also add newly-supported "qcom,sdx55-ipa", "qcom,sc7280-ipa".
--- Documentation/devicetree/bindings/net/qcom,ipa.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/net/qcom,ipa.yaml +5 -1
@@ -43,7 +43,11 @@ description: properties: compatible: - const: "qcom,sdm845-ipa" + oneOf: + - const: "qcom,sc7180-ipa" + - const: "qcom,sc7280-ipa" + - const: "qcom,sdm845-ipa" + - const: "qcom,sdx55-ipa" reg: items:
Signature · 1 line
2.27.0
Rob Herring
maintainerRe: [PATCH net-next 1/4] dt-bindings: net: qcom,ipa: add some compatible strings
Quoted 14 lines · Alex Elder
Add existing supported platform "qcom,sc7180-ipa" to the set of IPA compatible strings. Also add newly-supported "qcom,sdx55-ipa", "qcom,sc7280-ipa".
Signed-off-by Alex Elder <[email protected]>--- Documentation/devicetree/bindings/net/qcom,ipa.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/net/qcom,ipa.yaml +0
-0
Documentation/devicetree/bindings/net/qcom,ipa.yaml description: · line 50
Quoted 9 lines
Documentation/devicetree/bindings/net/qcom,ipa.yaml +5
-1@@ -43,7 +43,11 @@ description: properties: compatible: - const: "qcom,sdm845-ipa" + oneOf: + - const: "qcom,sc7180-ipa" + - const: "qcom,sc7280-ipa" + - const: "qcom,sdm845-ipa" + - const: "qcom,sdx55-ipa"
Use enum instead of oneOf + const. And drop the quotes.
Quoted 6 lines
Documentation/devicetree/bindings/net/qcom,ipa.yaml +0
-0reg: items:Signature · 1 line
2.27.0
PATCH 2/4 net: ipa: disable checksum offload for IPA v4.5+
In reply to Alex ElderChecksum offload for IPA v4.5+ is implemented differently, using "inline" offload (which uses a common header format for both upload and download offload).
The IPA hardware must be programmed to enable MAP checksum offload, but the RMNet driver is responsible for interpreting checksum metadata supplied with messages.
Currently, the RMNet driver does not support inline checksum offload. This support is imminent, but until it is available, do not allow newer versions of IPA to specify checksum offload for endpoints.
--- drivers/net/ipa/ipa_endpoint.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
drivers/net/ipa/ipa_endpoint.c +16 -0
@@ -88,6 +88,11 @@ static bool ipa_endpoint_data_valid_one(struct ipa *ipa, u32 count,if (ipa_gsi_endpoint_data_empty (data))return true; +/* IPA v4.5+ uses checksum offload, not yet supported by RMNet */ +if (ipa->version >=IPA_VERSION_4_5 ) +if (data->endpoint.config.checksum) +return false; +if (!data->toward_ipa) {if (data->endpoint.filter_support) { dev_err(dev, "filtering not supported for "
@@ -230,6 +235,17 @@ static bool ipa_endpoint_data_valid(struct ipa *ipa, u32 count,static bool ipa_endpoint_data_valid (struct ipa *ipa,u32 count,const struct ipa_gsi_endpoint_data *data) { +const struct ipa_gsi_endpoint_data *dp = data; +enum ipa_endpoint_name name; + +if (ipa->version <IPA_VERSION_4_5 ) +return true; + +/* IPA v4.5+ uses checksum offload, not yet supported by RMNet */ +for (name =0 ; name < count; name++, dp++) +if (data->endpoint.config.checksum) +return false; +return true; }
Signature · 1 line
2.27.0
PATCH 3/4 net: ipa: add IPA v4.5 configuration data
In reply to Alex ElderAdd support for the SDX55 SoC, which includes IPA version 4.5.
Starting with IPA v4.5, a few of the memory regions have a different number of "canary" values; update comments in the where the region identifers are defined to accurately reflect that.
I'll note three differences in SDX55 versus the other two existing platforms (SDM845 and SC7180):
- SDX55 uses a 32-bit Linux kernel
- SDX55 has four interconnects rather than three
- SDX55 uses IPA v4.5, which uses inline checksum offload
--- drivers/net/ipa/Makefile | 3 +- drivers/net/ipa/ipa_data-v4.5.c | 437 ++++++++++++++++++++++++++++++++ drivers/net/ipa/ipa_data.h | 1 + drivers/net/ipa/ipa_main.c | 4 + drivers/net/ipa/ipa_mem.h | 6 +- 5 files changed, 447 insertions(+), 4 deletions(-) create mode 100644 drivers/net/ipa/ipa_data-v4.5.c
drivers/net/ipa/Makefile +2 -1
@@ -9,4 +9,5 @@ ipa-y := ipa_main.o ipa_clock.o ipa_reg.o ipa_mem.o \ ipa_endpoint.o ipa_cmd.o ipa_modem.o \ ipa_resource.o ipa_qmi.o ipa_qmi_msg.o -ipa-y += ipa_data-v3.5.1.o ipa_data-v4.2.o +ipa-y += ipa_data-v3.5.1.o ipa_data-v4.2.o \ + ipa_data-v4.5.o
drivers/net/ipa/ipa_data-v4.5.c new file +437 -0
437 lines not on this page · raw message
drivers/net/ipa/ipa_data.h +1 -0
@@ -302,5 +302,6 @@ struct ipa_data {extern const struct ipa_data ipa_data_v3_5_1;extern const struct ipa_data ipa_data_v4_2; +extern const struct ipa_data ipa_data_v4_5;#endif /* _IPA_DATA_H_ */
drivers/net/ipa/ipa_main.c +4 -0
@@ -584,6 +584,10 @@ static const struct of_device_id ipa_match[] = { .compatible = "qcom,sc7180-ipa", .data = &ipa_data_v4_2, }, + { + .compatible = "qcom,sdx55-ipa", + .data = &ipa_data_v4_5, + }, { }, };MODULE_DEVICE_TABLE (of, ipa_match);
drivers/net/ipa/ipa_mem.h +3 -3
@@ -58,8 +58,8 @@ enum ipa_mem_id {IPA_MEM_MODEM_PROC_CTX ,/* 2 canaries */ IPA_MEM_AP_PROC_CTX ,/* 0 canaries */ IPA_MEM_NAT_TABLE ,/* 4 canaries (IPA v4.5 and above) */ -IPA_MEM_PDN_CONFIG ,/* 2 canaries (IPA v4.0 and above) */ -IPA_MEM_STATS_QUOTA_MODEM ,/* 2 canaries (IPA v4.0 and above) */ +IPA_MEM_PDN_CONFIG ,/* 0/2 canaries (IPA v4.0 and above) */ +IPA_MEM_STATS_QUOTA_MODEM ,/* 2/4 canaries (IPA v4.0 and above) */ IPA_MEM_STATS_QUOTA_AP ,/* 0 canaries (IPA v4.0 and above) */ IPA_MEM_STATS_TETHERING ,/* 0 canaries (IPA v4.0 and above) */ IPA_MEM_STATS_V4_FILTER, /* 0 canaries (IPA v4.0-v4.2) */
@@ -68,7 +68,7 @@ enum ipa_mem_id {IPA_MEM_STATS_V6_ROUTE ,/* 0 canaries (IPA v4.0-v4.2) */ IPA_MEM_STATS_FILTER_ROUTE ,/* 0 canaries (IPA v4.5 and above) */ IPA_MEM_STATS_DROP ,/* 0 canaries (IPA v4.0 and above) */ -IPA_MEM_MODEM ,/* 0 canaries */ +IPA_MEM_MODEM ,/* 0/2 canaries */ IPA_MEM_UC_EVENT_RING ,/* 1 canary */ IPA_MEM_COUNT, /* Number of regions (not an index) */ };
Signature · 1 line
2.27.0
PATCH 4/4 net: ipa: add IPA v4.11 configuration data
In reply to Alex ElderAdd support for the SC7280 SoC, which includes IPA version 4.11.
--- drivers/net/ipa/Makefile | 2 +- drivers/net/ipa/ipa_data-v4.11.c | 382 +++++++++++++++++++++++++++++++ drivers/net/ipa/ipa_data.h | 1 + drivers/net/ipa/ipa_main.c | 4 + 4 files changed, 388 insertions(+), 1 deletion(-) create mode 100644 drivers/net/ipa/ipa_data-v4.11.c
drivers/net/ipa/Makefile +1 -1
@@ -10,4 +10,4 @@ ipa-y := ipa_main.o ipa_clock.o ipa_reg.o ipa_mem.o \ ipa_resource.o ipa_qmi.o ipa_qmi_msg.o ipa-y += ipa_data-v3.5.1.o ipa_data-v4.2.o \ - ipa_data-v4.5.o + ipa_data-v4.5.o ipa_data-v4.11.o
drivers/net/ipa/ipa_data-v4.11.c new file +382 -0
382 lines not on this page · raw message
drivers/net/ipa/ipa_data.h +1 -0
@@ -303,5 +303,6 @@ struct ipa_data {extern const struct ipa_data ipa_data_v3_5_1;extern const struct ipa_data ipa_data_v4_2;extern const struct ipa_data ipa_data_v4_5; +extern const struct ipa_data ipa_data_v4_11;#endif /* _IPA_DATA_H_ */
drivers/net/ipa/ipa_main.c +4 -0
@@ -588,6 +588,10 @@ static const struct of_device_id ipa_match[] = { .compatible = "qcom,sdx55-ipa", .data = &ipa_data_v4_5, }, + { + .compatible = "qcom,sc7280-ipa", + .data = &ipa_data_v4_11, + }, { }, };MODULE_DEVICE_TABLE (of, ipa_match);
Signature · 1 line
2.27.0
This series was applied to netdev/net-next.git (refs/heads/master):
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
Quoted 10 lines · On Fri, 9 Apr 2021 15:40:20 -0500 you wrote:
This series adds IPA support for two more Qualcomm SoCs.
The first patch updates the DT binding to add compatible strings.
The second temporarily disables checksum offload support for IPA version 4.5 and above. Changes are required to the RMNet driver to support the "inline" checksum offload used for IPA v4.5+, and once those are present this capability will be enabled for IPA.
[...]
Here is the summary with links:
- [net-next,1/4] dt-bindings: net: qcom,ipa: add some compatible strings
https://git.kernel.org/netdev/net-next/c/c3264fee72e7 - [net-next,2/4] net: ipa: disable checksum offload for IPA v4.5+ https://git.kernel.org/netdev/net-next/c/c88c34fcf8f5 - [net-next,3/4] net: ipa: add IPA v4.5 configuration data https://git.kernel.org/netdev/net-next/c/fbb763e7e736 - [net-next,4/4] net: ipa: add IPA v4.11 configuration data https://git.kernel.org/netdev/net-next/c/927c5043459e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
This series was applied to qcom/linux.git (refs/heads/for-next):
Hello:
This series was applied to qcom/linux.git (refs/heads/for-next):
Quoted 10 lines · On Fri, 9 Apr 2021 15:40:20 -0500 you wrote:
This series adds IPA support for two more Qualcomm SoCs.
The first patch updates the DT binding to add compatible strings.
The second temporarily disables checksum offload support for IPA version 4.5 and above. Changes are required to the RMNet driver to support the "inline" checksum offload used for IPA v4.5+, and once those are present this capability will be enabled for IPA.
[...]
Here is the summary with links:
- [net-next,1/4] dt-bindings: net: qcom,ipa: add some compatible strings
https://git.kernel.org/qcom/c/c3264fee72e7 - [net-next,2/4] net: ipa: disable checksum offload for IPA v4.5+ https://git.kernel.org/qcom/c/c88c34fcf8f5 - [net-next,3/4] net: ipa: add IPA v4.5 configuration data https://git.kernel.org/qcom/c/fbb763e7e736 - [net-next,4/4] net: ipa: add IPA v4.11 configuration data https://git.kernel.org/qcom/c/927c5043459e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html