Skip to contentSkip to conversation

net: ena: Add dependency for ENA_ETHERNET

PATCH In review Mao Wenan 2 participants 5 messages Sep 20, 2019 – Sep 22, 2019

Subsystems (4)
lore
Share & tools
lore

Mao Wenan

author
#0 lore raw

PATCH 1/1 net: ena: Add dependency for ENA_ETHERNET

If CONFIG_ENA_ETHERNET=y and CONFIG_DIMLIB=n,
below erros can be found:
drivers/net/ethernet/amazon/ena/ena_netdev.o: In function `ena_dim_work':
ena_netdev.c:(.text+0x21cc): undefined reference to `net_dim_get_rx_moderation' ena_netdev.c:(.text+0x21cc): relocation truncated to
fit: R_AARCH64_CALL26 against undefined symbol net_dim_get_rx_moderation' drivers/net/ethernet/amazon/ena/ena_netdev.o: In function ena_io_poll':
ena_netdev.c:(.text+0x7bd4): undefined reference to `net_dim' ena_netdev.c:(.text+0x7bd4): relocation truncated to fit:
R_AARCH64_CALL26 against undefined symbol `net_dim'

After commit 282faf61a053 ("net: ena: switch to dim algorithm for rx adaptive interrupt moderation"), it introduces dim algorithm, which configured by CONFIG_DIMLIB.

Fixes 282faf61a053 ("net: ena: switch to dim algorithm for rx adaptive interrupt moderation")
---
 drivers/net/ethernet/amazon/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/amazon/Kconfig +1 -1
index 69ca99d..fe46df4 100644
@@ -18,7 +18,7 @@ if NET_VENDOR_AMAZON
 
 config ENA_ETHERNET
 	tristate "Elastic Network Adapter (ENA) support"
-	depends on PCI_MSI && !CPU_BIG_ENDIAN
+	depends on PCI_MSI && !CPU_BIG_ENDIAN && DIMLIB
 	---help---
 	  This driver supports Elastic Network Adapter (ENA)"
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 11 lines · Mao Wenan

If CONFIG_ENA_ETHERNET=y and CONFIG_DIMLIB=n,
below erros can be found:
drivers/net/ethernet/amazon/ena/ena_netdev.o: In function `ena_dim_work':
ena_netdev.c:(.text+0x21cc): undefined reference to `net_dim_get_rx_moderation' ena_netdev.c:(.text+0x21cc): relocation truncated to
fit: R_AARCH64_CALL26 against undefined symbol net_dim_get_rx_moderation' drivers/net/ethernet/amazon/ena/ena_netdev.o: In function ena_io_poll':
ena_netdev.c:(.text+0x7bd4): undefined reference to `net_dim' ena_netdev.c:(.text+0x7bd4): relocation truncated to fit:
R_AARCH64_CALL26 against undefined symbol `net_dim'

Quoted 5 lines

After commit 282faf61a053 ("net: ena: switch to dim algorithm for rx adaptive interrupt moderation"), it introduces dim algorithm, which configured by CONFIG_DIMLIB.

Fixes 282faf61a053 ("net: ena: switch to dim algorithm for rx adaptive interrupt moderation")

Thank you Mao, shortly after you posted your patch Uwe proposed to make DIMLIB a hidden symbol:

https://lore.kernel.org/netdev/[email protected]/T/#t

That patch will likely be applied soon, could you please rework your patch to use the "select" keyword instead of "depends". That's what other users do.

Quoted 13 lines
drivers/net/ethernet/amazon/Kconfig +1 -1
index 69ca99d..fe46df4 100644
@@ -18,7 +18,7 @@ if NET_VENDOR_AMAZON
 
 config ENA_ETHERNET
 	tristate "Elastic Network Adapter (ENA) support"
-	depends on PCI_MSI && !CPU_BIG_ENDIAN
+	depends on PCI_MSI && !CPU_BIG_ENDIAN && DIMLIB
 	---help---
 	  This driver supports Elastic Network Adapter (ENA)"
 
author
#2 lore raw
Quoted 18 lines · Jakub Kicinski
Quoted 11 lines · Mao Wenan

If CONFIG_ENA_ETHERNET=y and CONFIG_DIMLIB=n,
below erros can be found:
drivers/net/ethernet/amazon/ena/ena_netdev.o: In function `ena_dim_work':
ena_netdev.c:(.text+0x21cc): undefined reference to `net_dim_get_rx_moderation' ena_netdev.c:(.text+0x21cc): relocation truncated to
fit: R_AARCH64_CALL26 against undefined symbol net_dim_get_rx_moderation' drivers/net/ethernet/amazon/ena/ena_netdev.o: In function ena_io_poll':
ena_netdev.c:(.text+0x7bd4): undefined reference to `net_dim' ena_netdev.c:(.text+0x7bd4): relocation truncated to fit:
R_AARCH64_CALL26 against undefined symbol `net_dim'

Quoted 5 lines

After commit 282faf61a053 ("net: ena: switch to dim algorithm for rx adaptive interrupt moderation"), it introduces dim algorithm, which configured by CONFIG_DIMLIB.

Fixes 282faf61a053 ("net: ena: switch to dim algorithm for rx adaptive interrupt moderation")
Quoted 8 lines

Thank you Mao, shortly after you posted your patch Uwe proposed to make DIMLIB a hidden symbol:

https://lore.kernel.org/netdev/[email protected]/T/#t

That patch will likely be applied soon, could you please rework your patch to use the "select" keyword instead of "depends". That's what other users do.

Ok, I will send v2.

Quoted 18 lines
Quoted 6 lines
drivers/net/ethernet/amazon/Kconfig +0 -0
index 69ca99d..fe46df4 100644

drivers/net/ethernet/amazon/Kconfig if NET_VENDOR_AMAZON · line 24

Quoted 8 lines
drivers/net/ethernet/amazon/Kconfig +1 -1
@@ -18,7 +18,7 @@ if NET_VENDOR_AMAZON
 
 config ENA_ETHERNET
 	tristate "Elastic Network Adapter (ENA) support"
-	depends on PCI_MSI && !CPU_BIG_ENDIAN
+	depends on PCI_MSI && !CPU_BIG_ENDIAN && DIMLIB
 	---help---
 	  This driver supports Elastic Network Adapter (ENA)"
 

.

author
#3 lore raw

PATCH v2 1/1 net: ena: Select DIMLIB for ENA_ETHERNET

In reply to Jakub Kicinski

If CONFIG_ENA_ETHERNET=y and CONFIG_DIMLIB=n,
below erros can be found:
drivers/net/ethernet/amazon/ena/ena_netdev.o: In function `ena_dim_work':
ena_netdev.c:(.text+0x21cc): undefined reference to `net_dim_get_rx_moderation' ena_netdev.c:(.text+0x21cc): relocation truncated to
fit: R_AARCH64_CALL26 against undefined symbol net_dim_get_rx_moderation' drivers/net/ethernet/amazon/ena/ena_netdev.o: In function ena_io_poll':
ena_netdev.c:(.text+0x7bd4): undefined reference to `net_dim' ena_netdev.c:(.text+0x7bd4): relocation truncated to fit:
R_AARCH64_CALL26 against undefined symbol `net_dim'

After commit 282faf61a053 ("net: ena: switch to dim algorithm for rx adaptive interrupt moderation"), it introduces dim algorithm, which configured by CONFIG_DIMLIB. So, this patch is to select DIMLIB for ENA_ETHERNET.

Fixes 282faf61a053 ("net: ena: switch to dim algorithm for rx adaptive interrupt moderation")

---
v2: change subject of patch, use the "select" keyword instead of "depends".

 drivers/net/ethernet/amazon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/amazon/Kconfig +1 -0
index 69ca99d8ac26..cca72a75f551 100644
@@ -19,6 +19,7 @@ if NET_VENDOR_AMAZON
 config ENA_ETHERNET
 	tristate "Elastic Network Adapter (ENA) support"
 	depends on PCI_MSI && !CPU_BIG_ENDIAN
+	select DIMLIB
 	---help---
 	  This driver supports Elastic Network Adapter (ENA)"
 
Signature · 1 line
2.20.1
#4 lore raw

Re: [PATCH v2 net] net: ena: Select DIMLIB for ENA_ETHERNET

Quoted 11 lines · Mao Wenan

If CONFIG_ENA_ETHERNET=y and CONFIG_DIMLIB=n,
below erros can be found:
drivers/net/ethernet/amazon/ena/ena_netdev.o: In function `ena_dim_work':
ena_netdev.c:(.text+0x21cc): undefined reference to `net_dim_get_rx_moderation' ena_netdev.c:(.text+0x21cc): relocation truncated to
fit: R_AARCH64_CALL26 against undefined symbol net_dim_get_rx_moderation' drivers/net/ethernet/amazon/ena/ena_netdev.o: In function ena_io_poll':
ena_netdev.c:(.text+0x7bd4): undefined reference to `net_dim' ena_netdev.c:(.text+0x7bd4): relocation truncated to fit:
R_AARCH64_CALL26 against undefined symbol `net_dim'

Quoted 6 lines

After commit 282faf61a053 ("net: ena: switch to dim algorithm for rx adaptive interrupt moderation"), it introduces dim algorithm, which configured by CONFIG_DIMLIB. So, this patch is to select DIMLIB for ENA_ETHERNET.

Fixes 282faf61a053 ("net: ena: switch to dim algorithm for rx adaptive interrupt moderation")

Applied, thank you!