All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 iproute2 0/2] tc: fix parsing of TCA_EXT_WARN_MSG
@ 2023-03-16  3:52 Hangbin Liu
  2023-03-16  3:52 ` [PATCHv2 iproute2 1/2] Revert "tc: m_action: fix parsing of TCA_EXT_WARN_MSG" Hangbin Liu
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Hangbin Liu @ 2023-03-16  3:52 UTC (permalink / raw)
  To: netdev
  Cc: Jamal Hadi Salim, Cong Wang, Jiri Pirko, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern,
	Stephen Hemminger, Davide Caratti, Pedro Tammela,
	Marcelo Leitner, Phil Sutter, Hangbin Liu

The TCA_EXT_WARN_MSG enum belongs to __TCA_MAX namespace. We can't use it
in tc action as it use TCA_ROOT_MAX enum. Fix it by adding a new
TCA_ROOT_EXT_WARN_MSG enum.

Hangbin Liu (2):
  Revert "tc: m_action: fix parsing of TCA_EXT_WARN_MSG"
  tc: m_action: fix parsing of TCA_EXT_WARN_MSG by using different enum

 include/uapi/linux/rtnetlink.h | 1 +
 tc/m_action.c                  | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCHv2 iproute2 1/2] Revert "tc: m_action: fix parsing of TCA_EXT_WARN_MSG"
  2023-03-16  3:52 [PATCHv2 iproute2 0/2] tc: fix parsing of TCA_EXT_WARN_MSG Hangbin Liu
@ 2023-03-16  3:52 ` Hangbin Liu
  2023-03-16  3:52 ` [PATCHv2 iproute2 2/2] tc: m_action: fix parsing of TCA_EXT_WARN_MSG by using different enum Hangbin Liu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Hangbin Liu @ 2023-03-16  3:52 UTC (permalink / raw)
  To: netdev
  Cc: Jamal Hadi Salim, Cong Wang, Jiri Pirko, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern,
	Stephen Hemminger, Davide Caratti, Pedro Tammela,
	Marcelo Leitner, Phil Sutter, Hangbin Liu, Andrea Claudi

This reverts commit 70b9ebae63ce7e6f9911bdfbcf47a6d18f24159a.

The TCA_EXT_WARN_MSG is not sit within the TCA_ACT_TAB hierarchy. It's
belong to the TCA_MAX namespace. I will fix the issue in another patch.

Reviewed-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 tc/m_action.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tc/m_action.c b/tc/m_action.c
index 6c91af2c..0400132c 100644
--- a/tc/m_action.c
+++ b/tc/m_action.c
@@ -586,7 +586,7 @@ int print_action(struct nlmsghdr *n, void *arg)
 
 	open_json_object(NULL);
 	tc_dump_action(fp, tb[TCA_ACT_TAB], tot_acts ? *tot_acts:0, false);
-	print_ext_msg(&tb[TCA_ACT_TAB]);
+	print_ext_msg(tb);
 	close_json_object();
 
 	return 0;
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCHv2 iproute2 2/2] tc: m_action: fix parsing of TCA_EXT_WARN_MSG by using different enum
  2023-03-16  3:52 [PATCHv2 iproute2 0/2] tc: fix parsing of TCA_EXT_WARN_MSG Hangbin Liu
  2023-03-16  3:52 ` [PATCHv2 iproute2 1/2] Revert "tc: m_action: fix parsing of TCA_EXT_WARN_MSG" Hangbin Liu
@ 2023-03-16  3:52 ` Hangbin Liu
  2023-03-19  2:26   ` Stephen Hemminger
  2023-03-16 15:18 ` [PATCHv2 iproute2 0/2] tc: fix parsing of TCA_EXT_WARN_MSG Andrea Claudi
  2023-03-19  2:30 ` patchwork-bot+netdevbpf
  3 siblings, 1 reply; 7+ messages in thread
From: Hangbin Liu @ 2023-03-16  3:52 UTC (permalink / raw)
  To: netdev
  Cc: Jamal Hadi Salim, Cong Wang, Jiri Pirko, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern,
	Stephen Hemminger, Davide Caratti, Pedro Tammela,
	Marcelo Leitner, Phil Sutter, Hangbin Liu, Andrea Claudi

We can't use TCA_EXT_WARN_MSG directly in tc action as it's using different
enum with filter. Let's use a new TCA_ROOT_EXT_WARN_MSG for tc action
specifically.

Fixes: 6035995665b7 ("tc: add new attr TCA_EXT_WARN_MSG")
Reviewed-by: Andrea Claudi <aclaudi@redhat.com>
Reported-and-tested-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
v2: rename TCA_ACT_EXT_ to TCA_ROOT_EXT_
---
 include/uapi/linux/rtnetlink.h | 1 +
 tc/m_action.c                  | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index 217b25b9..2132e941 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -787,6 +787,7 @@ enum {
 	TCA_ROOT_FLAGS,
 	TCA_ROOT_COUNT,
 	TCA_ROOT_TIME_DELTA, /* in msecs */
+	TCA_ROOT_EXT_WARN_MSG,
 	__TCA_ROOT_MAX,
 #define	TCA_ROOT_MAX (__TCA_ROOT_MAX - 1)
 };
diff --git a/tc/m_action.c b/tc/m_action.c
index 0400132c..a446cabd 100644
--- a/tc/m_action.c
+++ b/tc/m_action.c
@@ -586,7 +586,13 @@ int print_action(struct nlmsghdr *n, void *arg)
 
 	open_json_object(NULL);
 	tc_dump_action(fp, tb[TCA_ACT_TAB], tot_acts ? *tot_acts:0, false);
-	print_ext_msg(tb);
+
+	if (tb[TCA_ROOT_EXT_WARN_MSG]) {
+		print_string(PRINT_ANY, "warn", "%s",
+			     rta_getattr_str(tb[TCA_ROOT_EXT_WARN_MSG]));
+		print_nl();
+	}
+
 	close_json_object();
 
 	return 0;
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCHv2 iproute2 0/2] tc: fix parsing of TCA_EXT_WARN_MSG
  2023-03-16  3:52 [PATCHv2 iproute2 0/2] tc: fix parsing of TCA_EXT_WARN_MSG Hangbin Liu
  2023-03-16  3:52 ` [PATCHv2 iproute2 1/2] Revert "tc: m_action: fix parsing of TCA_EXT_WARN_MSG" Hangbin Liu
  2023-03-16  3:52 ` [PATCHv2 iproute2 2/2] tc: m_action: fix parsing of TCA_EXT_WARN_MSG by using different enum Hangbin Liu
@ 2023-03-16 15:18 ` Andrea Claudi
  2023-03-19  2:30 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 7+ messages in thread
From: Andrea Claudi @ 2023-03-16 15:18 UTC (permalink / raw)
  To: Hangbin Liu
  Cc: netdev, Jamal Hadi Salim, Cong Wang, Jiri Pirko, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern,
	Stephen Hemminger, Davide Caratti, Pedro Tammela,
	Marcelo Leitner, Phil Sutter

On Thu, Mar 16, 2023 at 11:52:40AM +0800, Hangbin Liu wrote:
> The TCA_EXT_WARN_MSG enum belongs to __TCA_MAX namespace. We can't use it
> in tc action as it use TCA_ROOT_MAX enum. Fix it by adding a new
> TCA_ROOT_EXT_WARN_MSG enum.
> 
> Hangbin Liu (2):
>   Revert "tc: m_action: fix parsing of TCA_EXT_WARN_MSG"
>   tc: m_action: fix parsing of TCA_EXT_WARN_MSG by using different enum
> 
>  include/uapi/linux/rtnetlink.h | 1 +
>  tc/m_action.c                  | 8 +++++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> -- 
> 2.38.1
> 

Reviewed-by: Andrea Claudi <aclaudi@redhat.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCHv2 iproute2 2/2] tc: m_action: fix parsing of TCA_EXT_WARN_MSG by using different enum
  2023-03-16  3:52 ` [PATCHv2 iproute2 2/2] tc: m_action: fix parsing of TCA_EXT_WARN_MSG by using different enum Hangbin Liu
@ 2023-03-19  2:26   ` Stephen Hemminger
  2023-03-20  9:18     ` Hangbin Liu
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2023-03-19  2:26 UTC (permalink / raw)
  To: Hangbin Liu
  Cc: netdev, Jamal Hadi Salim, Cong Wang, Jiri Pirko, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern,
	Davide Caratti, Pedro Tammela, Marcelo Leitner, Phil Sutter,
	Andrea Claudi

On Thu, 16 Mar 2023 11:52:42 +0800
Hangbin Liu <liuhangbin@gmail.com> wrote:

> We can't use TCA_EXT_WARN_MSG directly in tc action as it's using different
> enum with filter. Let's use a new TCA_ROOT_EXT_WARN_MSG for tc action
> specifically.
> 
> Fixes: 6035995665b7 ("tc: add new attr TCA_EXT_WARN_MSG")
> Reviewed-by: Andrea Claudi <aclaudi@redhat.com>
> Reported-and-tested-by: Davide Caratti <dcaratti@redhat.com>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---

Applied but all headers files get done separately by a script
that uses sanitized kernel headers.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCHv2 iproute2 0/2] tc: fix parsing of TCA_EXT_WARN_MSG
  2023-03-16  3:52 [PATCHv2 iproute2 0/2] tc: fix parsing of TCA_EXT_WARN_MSG Hangbin Liu
                   ` (2 preceding siblings ...)
  2023-03-16 15:18 ` [PATCHv2 iproute2 0/2] tc: fix parsing of TCA_EXT_WARN_MSG Andrea Claudi
@ 2023-03-19  2:30 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-03-19  2:30 UTC (permalink / raw)
  To: Hangbin Liu
  Cc: netdev, jhs, xiyou.wangcong, jiri, davem, edumazet, kuba, pabeni,
	dsahern, stephen, dcaratti, pctammela, mleitner, psutter

Hello:

This series was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:

On Thu, 16 Mar 2023 11:52:40 +0800 you wrote:
> The TCA_EXT_WARN_MSG enum belongs to __TCA_MAX namespace. We can't use it
> in tc action as it use TCA_ROOT_MAX enum. Fix it by adding a new
> TCA_ROOT_EXT_WARN_MSG enum.
> 
> Hangbin Liu (2):
>   Revert "tc: m_action: fix parsing of TCA_EXT_WARN_MSG"
>   tc: m_action: fix parsing of TCA_EXT_WARN_MSG by using different enum
> 
> [...]

Here is the summary with links:
  - [PATCHv2,iproute2,1/2] Revert "tc: m_action: fix parsing of TCA_EXT_WARN_MSG"
    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=0012881f3499
  - [PATCHv2,iproute2,2/2] tc: m_action: fix parsing of TCA_EXT_WARN_MSG by using different enum
    (no matching commit)

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCHv2 iproute2 2/2] tc: m_action: fix parsing of TCA_EXT_WARN_MSG by using different enum
  2023-03-19  2:26   ` Stephen Hemminger
@ 2023-03-20  9:18     ` Hangbin Liu
  0 siblings, 0 replies; 7+ messages in thread
From: Hangbin Liu @ 2023-03-20  9:18 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: netdev, Jamal Hadi Salim, Cong Wang, Jiri Pirko, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern,
	Davide Caratti, Pedro Tammela, Marcelo Leitner, Phil Sutter,
	Andrea Claudi

On Sat, Mar 18, 2023 at 07:26:51PM -0700, Stephen Hemminger wrote:
> Applied but all headers files get done separately by a script
> that uses sanitized kernel headers.

Got it, I will drop the header file changes in future.

Thanks
Hangbin

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-20  9:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16  3:52 [PATCHv2 iproute2 0/2] tc: fix parsing of TCA_EXT_WARN_MSG Hangbin Liu
2023-03-16  3:52 ` [PATCHv2 iproute2 1/2] Revert "tc: m_action: fix parsing of TCA_EXT_WARN_MSG" Hangbin Liu
2023-03-16  3:52 ` [PATCHv2 iproute2 2/2] tc: m_action: fix parsing of TCA_EXT_WARN_MSG by using different enum Hangbin Liu
2023-03-19  2:26   ` Stephen Hemminger
2023-03-20  9:18     ` Hangbin Liu
2023-03-16 15:18 ` [PATCHv2 iproute2 0/2] tc: fix parsing of TCA_EXT_WARN_MSG Andrea Claudi
2023-03-19  2:30 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.