* [Patch iproute2] skbedit: print action too
@ 2015-01-28 22:52 Cong Wang
2015-01-29 3:49 ` Dennis Chen
2015-02-05 18:09 ` Stephen Hemminger
0 siblings, 2 replies; 4+ messages in thread
From: Cong Wang @ 2015-01-28 22:52 UTC (permalink / raw)
To: netdev; +Cc: Cong Wang, Jamal Hadi Salim, Stephen Hemminger
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
tc/m_skbedit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c
index 36323a9..c5deee0 100644
--- a/tc/m_skbedit.c
+++ b/tc/m_skbedit.c
@@ -193,7 +193,7 @@ static int print_skbedit(struct action_util *au, FILE *f, struct rtattr *arg)
fprintf(f, " mark %d", *mark);
}
- fprintf(f, "\n\t index %d ref %d bind %d", p->index, p->refcnt, p->bindcnt);
+ fprintf(f, " %s\n\t index %d ref %d bind %d", action_n2a(p->action, b1, sizeof (b1)), p->index, p->refcnt, p->bindcnt);
if (show_stats) {
if (tb[TCA_SKBEDIT_TM]) {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Patch iproute2] skbedit: print action too
2015-01-28 22:52 [Patch iproute2] skbedit: print action too Cong Wang
@ 2015-01-29 3:49 ` Dennis Chen
2015-01-29 3:51 ` Cong Wang
2015-02-05 18:09 ` Stephen Hemminger
1 sibling, 1 reply; 4+ messages in thread
From: Dennis Chen @ 2015-01-29 3:49 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev, Jamal Hadi Salim, Stephen Hemminger
On Thu, Jan 29, 2015 at 6:52 AM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
> ---
> tc/m_skbedit.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c
> index 36323a9..c5deee0 100644
> --- a/tc/m_skbedit.c
> +++ b/tc/m_skbedit.c
> @@ -193,7 +193,7 @@ static int print_skbedit(struct action_util *au, FILE *f, struct rtattr *arg)
> fprintf(f, " mark %d", *mark);
> }
>
> - fprintf(f, "\n\t index %d ref %d bind %d", p->index, p->refcnt, p->bindcnt);
> + fprintf(f, " %s\n\t index %d ref %d bind %d", action_n2a(p->action, b1, sizeof (b1)), p->index, p->refcnt, p->bindcnt);
>
> if (show_stats) {
> if (tb[TCA_SKBEDIT_TM]) {
> --
> 1.8.3.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello cong, seems no big benifit I can see for the patch...
--
Den
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch iproute2] skbedit: print action too
2015-01-29 3:49 ` Dennis Chen
@ 2015-01-29 3:51 ` Cong Wang
0 siblings, 0 replies; 4+ messages in thread
From: Cong Wang @ 2015-01-29 3:51 UTC (permalink / raw)
To: Dennis Chen; +Cc: netdev, Jamal Hadi Salim, Stephen Hemminger
On Wed, Jan 28, 2015 at 7:49 PM, Dennis Chen <kernel.org.gnu@gmail.com> wrote:
>
> Hello cong, seems no big benifit I can see for the patch...
>
You need to understand skbedit action.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch iproute2] skbedit: print action too
2015-01-28 22:52 [Patch iproute2] skbedit: print action too Cong Wang
2015-01-29 3:49 ` Dennis Chen
@ 2015-02-05 18:09 ` Stephen Hemminger
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2015-02-05 18:09 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev, Jamal Hadi Salim
On Wed, 28 Jan 2015 14:52:42 -0800
Cong Wang <xiyou.wangcong@gmail.com> wrote:
> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
> ---
> tc/m_skbedit.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c
> index 36323a9..c5deee0 100644
> --- a/tc/m_skbedit.c
> +++ b/tc/m_skbedit.c
> @@ -193,7 +193,7 @@ static int print_skbedit(struct action_util *au, FILE *f, struct rtattr *arg)
> fprintf(f, " mark %d", *mark);
> }
>
> - fprintf(f, "\n\t index %d ref %d bind %d", p->index, p->refcnt, p->bindcnt);
> + fprintf(f, " %s\n\t index %d ref %d bind %d", action_n2a(p->action, b1, sizeof (b1)), p->index, p->refcnt, p->bindcnt);
>
> if (show_stats) {
> if (tb[TCA_SKBEDIT_TM]) {
It is good to show everything that is set.
The output of tc show commands should match the arguments used
to create. In this case you are printing does not match the input.
Also, I would rather see this in a separate fprintf rather than
overloading existing call.
Please cleanup and resubmit.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-05 18:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-28 22:52 [Patch iproute2] skbedit: print action too Cong Wang
2015-01-29 3:49 ` Dennis Chen
2015-01-29 3:51 ` Cong Wang
2015-02-05 18:09 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).