evl/genirq/test: fix irq test build issue
Subsystems (3)
PATCH 1/2 evl/genirq/test: fix irq test build issue
raw lock in irq test case should be replaced with hybrid lock.
--- kernel/irq/irq_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/irq_test.c +1 -1
@@ -145,7 +145,7 @@ static void irq_shutdown_depth_test(struct kunit *test)disable_irq (virq);KUNIT_EXPECT_EQ (test, desc->depth,1 ); - scoped_guard(raw_spinlock_irqsave, &desc->lock) + scoped_guard(hybrid_spinlock_irqsave, &desc->lock)irq_shutdown_and_deactivate (desc);KUNIT_EXPECT_FALSE (test,irqd_is_activated (data));
Signature · 1 line
2.43.0
PATCH 2/2 evl/net: export sock_oob_bind symbol
API sock_oob_bind symbol should be exported because it might be used in other kernel modules.
--- kernel/evl/net/socket.c | 1 + 1 file changed, 1 insertion(+)
kernel/evl/net/socket.c +1 -0
@@ -449,6 +449,7 @@ int sock_oob_bind(struct sock *sk, struct sockaddr *addr, int len)return esk->proto->bind (esk, addr, len); } +EXPORT_SYMBOL (sock_oob_bind);/* * In-band call from the common network stack to shutdown the
Signature · 1 line
2.43.0
Re: [PATCH evl 6.18 2/2] evl/net: export sock_oob_bind symbol
Quoted 3 lines · Junxiao Chang
API
sock_oob_bindsymbol should be exported because it might be used in other kernel modules.
The routine you are exporting is the implementation of a weak symbol called by the regular network stack in order to allow any real-time core which may be interested to extend the logic of a common networking operation, in this case socket binding as extended by evl. If you were to add some evl-managed protocol, then you would declare it to its network stack, so that sock_oob_bind() could automatically route any relevant request to some handler in your protocol implementation.
Therefore, I'm unsure to understand what could be the use case here, why would and evl-based module need to call this routine?
Quoted 19 lines
Fixes 9afaf877fa08 ("evl: add net core (EXPERIMENTAL)")Signed-off-by Junxiao Chang <[email protected]>Signed-off-by Yuan Wang <[email protected]>--- kernel/evl/net/socket.c | 1 + 1 file changed, 1 insertion(+)kernel/evl/net/socket.c +1
-0@@ -449,6 +449,7 @@ int sock_oob_bind(struct sock *sk, struct sockaddr *addr, int len)return esk->proto->bind (esk, addr, len); } +EXPORT_SYMBOL (sock_oob_bind);/* * In-band call from the common network stack to shutdown the
Signature · 1 line
Philippe.
RE: [PATCH evl 6.18 2/2] evl/net: export sock_oob_bind symbol
Quoted 15 lines · Philippe Gerum
Quoted 3 lines · Junxiao Chang
API
sock_oob_bindsymbol should be exported because it might be used in other kernel modules.The routine you are exporting is the implementation of a weak symbol called by the regular network stack in order to allow any real-time core which may be interested to extend the logic of a common networking operation, in this case socket binding as extended by evl. If you were to add some evl-managed protocol, then you would declare it to its network stack, so that
sock_oob_bind()could automatically route any relevant request to some handler in your protocol implementation.
Quoted 2 lines
Therefore, I'm unsure to understand what could be the use case here, why would and evl-based module need to call this routine?
Thank you for reviewing it! It is a minor build issue. When we try "make allmodconfig && make -j48" to build EVL kernel, it returns below error:
ERROR: modpost: "sock_oob_bind" [net/packet/af_packet.ko] undefined!
af_packet.c is built as kernel module(CONFIG_PACKET=m), it calls sock_oob_bind API which is defined in kernel/evl/net/socket.c, this API should be exported.
Quoted 23 lines
Quoted 13 lines
Fixes 9afaf877fa08 ("evl: add net core (EXPERIMENTAL)")Signed-off-by Junxiao Chang <[email protected]>Signed-off-by Yuan Wang <[email protected]>--- kernel/evl/net/socket.c | 1 + 1 file changed, 1 insertion(+)kernel/evl/net/socket.c index renamed from kernel/evl/net/socket.c +0
-0
4c61a1c1f6d0..b87f3fa9863d100644kernel/evl/net/socket.c int sock_oob_bind(struct sock *sk, struct sockaddr · line 455
Quoted 7 lines
kernel/evl/net/socket.c +1
-0@@ -449,6 +449,7 @@ int sock_oob_bind(struct sock *sk, struct sockaddr *addr, int len)return esk->proto->bind (esk, addr, len); } +EXPORT_SYMBOL (sock_oob_bind);/* * In-band call from the common network stack to shutdown the --
Philippe.
Re: [PATCH evl 6.18 2/2] evl/net: export sock_oob_bind symbol
Quoted 19 lines · Junxiao
Quoted 15 lines · Philippe Gerum
Quoted 3 lines · Junxiao Chang
API
sock_oob_bindsymbol should be exported because it might be used in other kernel modules.The routine you are exporting is the implementation of a weak symbol called by the regular network stack in order to allow any real-time core which may be interested to extend the logic of a common networking operation, in this case socket binding as extended by evl. If you were to add some evl-managed protocol, then you would declare it to its network stack, so that
sock_oob_bind()could automatically route any relevant request to some handler in your protocol implementation.Quoted 2 lines
Therefore, I'm unsure to understand what could be the use case here, why would and evl-based module need to call this routine?
Quoted 7 lines
Thank you for reviewing it! It is a minor build issue. When we try "make allmodconfig && make -j48" to build EVL kernel, it returns below error:
ERROR: modpost: "sock_oob_bind" [net/packet/af_packet.ko] undefined!
af_packet.cis built as kernelmodule(CONFIG_PACKET=m), it callssock_oob_bindAPI which is defined inkernel/evl/net/socket.c, this API should be exported.
Ok, you are building some standard protocol support as modules, makes sense then. In this case, please resubmit a patch using EXPORT_SYMBOL_GPL() instead.
Signature · 1 line
Philippe.
PATCH 1/1 evl/net: export sock_oob_bind symbol
In reply to Junxiao ChangAPI sock_oob_bind symbol should be exported because it might be used in other kernel modules.
--- kernel/evl/net/socket.c | 1 + 1 file changed, 1 insertion(+)
kernel/evl/net/socket.c +1 -0
@@ -449,6 +449,7 @@ int sock_oob_bind(struct sock *sk, struct sockaddr *addr, int len)return esk->proto->bind (esk, addr, len); } +EXPORT_SYMBOL_GPL (sock_oob_bind);/* * In-band call from the common network stack to shutdown the
Signature · 1 line
2.43.0
Re: [PATCH] evl/net: export sock_oob_bind symbol
Quoted 15 lines · Junxiao Chang
API
sock_oob_bindsymbol should be exported because it might be used in other kernel modules.Fixes 9afaf877fa08 ("evl: add net core (EXPERIMENTAL)")Signed-off-by Junxiao Chang <[email protected]>Signed-off-by Yuan Wang <[email protected]>--- kernel/evl/net/socket.c | 1 + 1 file changed, 1 insertion(+)kernel/evl/net/socket.c +0
-0
kernel/evl/net/socket.c int sock_oob_bind(struct sock *sk, struct sockaddr *addr, int len) · line 455
Quoted 7 lines
kernel/evl/net/socket.c +1
-0@@ -449,6 +449,7 @@ int sock_oob_bind(struct sock *sk, struct sockaddr *addr, int len)return esk->proto->bind (esk, addr, len); } +EXPORT_SYMBOL_GPL (sock_oob_bind);/* * In-band call from the common network stack to shutdown the
Almost there, I just figured out that there is an even better option though, so that we can keep this hunk in the code which actually defines the interface. This patch would sit on the dovetail side (not evl):
net/socket.c +1 -0
@@ -167,6 +167,7 @@ int __weak sock_oob_bind(struct sock *sk, struct sockaddr *addr, int len) {return 0 ; } +EXPORT_SYMBOL_GPL (sock_oob_bind);int __weak sock_oob_shutdown (struct sock *sk,int how) {
Signature · 1 line
Philippe.
RE: [PATCH] evl/net: export sock_oob_bind symbol
Quoted 23 lines · Philippe Gerum
Quoted 20 lines · Junxiao Chang
API
sock_oob_bindsymbol should be exported because it might be used in other kernel modules.Fixes 9afaf877fa08 ("evl: add net core (EXPERIMENTAL)")Signed-off-by Junxiao Chang <[email protected]>Signed-off-by Yuan Wang <[email protected]>--- kernel/evl/net/socket.c | 1 + 1 file changed, 1 insertion(+)kernel/evl/net/socket.c index renamed from kernel/evl/net/socket.c +0
-0
4c61a1c1f6d0..69593470d62b100644kernel/evl/net/socket.c +1
-0@@ -449,6 +449,7 @@ int sock_oob_bind(struct sock *sk, struct sockaddr *addr, int len)return esk->proto->bind (esk, addr, len); } +EXPORT_SYMBOL_GPL (sock_oob_bind);
Quoted 6 lines
kernel/evl/net/socket.c int sock_oob_bind(struct sock *sk, struct sockaddr · line 455
Quoted 2 lines
kernel/evl/net/socket.c +0
-0/* * In-band call from the common network stack to shutdown the Almost there, I just figured out that there is an even better option though, so that we can keep this hunk in the code which actually defines the interface. This patch would sit on the dovetail side (not evl):
Yes, below patch makes sense. For evl/dovetail, your suggestion is that we should submit below patch to below repo and branch? https://gitlab.com/Xenomai/linux-dovetail/-/tree/v6.18.y-dovetail-rebase
Quoted 14 lines
net/socket.c index 1ecf67b656c51..ba00e99b042cf renamed from net/socket.c +0
-0100644
net/socket.c +1
-1@@ -167,6 +167,7 @@ int __weak sock_oob_bind(struct sock *sk, struct sockaddr *addr, int len) {return 0 ; } +EXPORT_SYMBOL_GPL (sock_oob_bind);int __weak sock_oob_shutdown (struct sock *sk,int how) { --Philippe.
Re: [PATCH] evl/net: export sock_oob_bind symbol
Quoted 24 lines · Junxiao
Quoted 23 lines · Philippe Gerum
Quoted 20 lines · Junxiao Chang
API
sock_oob_bindsymbol should be exported because it might be used in other kernel modules.Fixes 9afaf877fa08 ("evl: add net core (EXPERIMENTAL)")Signed-off-by Junxiao Chang <[email protected]>Signed-off-by Yuan Wang <[email protected]>--- kernel/evl/net/socket.c | 1 + 1 file changed, 1 insertion(+)kernel/evl/net/socket.c index renamed from kernel/evl/net/socket.c +0
-0
4c61a1c1f6d0..69593470d62b100644kernel/evl/net/socket.c +1
-0@@ -449,6 +449,7 @@ int sock_oob_bind(struct sock *sk, struct sockaddr *addr, int len)return esk->proto->bind (esk, addr, len); } +EXPORT_SYMBOL_GPL (sock_oob_bind);
Quoted 9 lines
Quoted 6 lines
kernel/evl/net/socket.c int sock_oob_bind(struct sock *sk, struct sockaddr · line 455
Quoted 2 lines
kernel/evl/net/socket.c +0
-0/* * In-band call from the common network stack to shutdown the Almost there, I just figured out that there is an even better option though, so that we can keep this hunk in the code which actually defines the interface. This patch would sit on the dovetail side (not evl):
Yes, below patch makes sense. For evl/dovetail, your suggestion is that we should submit below patch to below repo and branch? https://gitlab.com/Xenomai/linux-dovetail/-/tree/v6.18.y-dovetail-rebase
Yes please.
Signature · 1 line
Philippe.
Philippe Gerum
AppliedRe: [PATCH] evl/net: export sock_oob_bind symbol
In reply to Junxiao ChangQuoted 15 lines · Junxiao Chang
API
sock_oob_bindsymbol should be exported because it might be used in other kernel modules.Fixes 9afaf877fa08 ("evl: add net core (EXPERIMENTAL)")Signed-off-by Junxiao Chang <[email protected]>Signed-off-by Yuan Wang <[email protected]>--- kernel/evl/net/socket.c | 1 + 1 file changed, 1 insertion(+)kernel/evl/net/socket.c +0
-0
kernel/evl/net/socket.c int sock_oob_bind(struct sock *sk, struct sockaddr *addr, int len) · line 455
Quoted 7 lines
kernel/evl/net/socket.c +1
-0@@ -449,6 +449,7 @@ int sock_oob_bind(struct sock *sk, struct sockaddr *addr, int len)return esk->proto->bind (esk, addr, len); } +EXPORT_SYMBOL_GPL (sock_oob_bind);/* * In-band call from the common network stack to shutdown the
Merged, thanks.
Signature · 1 line
Philippe.
Quoted 14 lines · Junxiao Chang
raw lock in irq test case should be replaced with hybrid lock.
Fixes a4a5748406af ("genirq: irq_pipeline: add IRQ pipeline core")Signed-off-by Junxiao Chang <[email protected]>Signed-off-by Yuan Wang <[email protected]>--- kernel/irq/irq_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/irq/irq_test.c +0
-0
kernel/irq/irq_test.c static void irq_shutdown_depth_test(struct kunit *test) · line 151
Quoted 8 lines
kernel/irq/irq_test.c +1
-1@@ -145,7 +145,7 @@ static void irq_shutdown_depth_test(struct kunit *test)disable_irq (virq);KUNIT_EXPECT_EQ (test, desc->depth,1 ); - scoped_guard(raw_spinlock_irqsave, &desc->lock) + scoped_guard(hybrid_spinlock_irqsave, &desc->lock)irq_shutdown_and_deactivate (desc);KUNIT_EXPECT_FALSE (test,irqd_is_activated (data));
Merged (slightly fixing up the short log to align with the existing convention about prefixing), thanks.
Signature · 1 line
Philippe.