From: Jakub Kicinski <kuba@kernel.org>
To: Zahari Doychev <zahari.doychev@linux.com>
Cc: donald.hunter@gmail.com, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com, horms@kernel.org,
jacob.e.keller@intel.com, ast@fiberby.net, matttbe@kernel.org,
netdev@vger.kernel.org, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us,
johannes@sipsolutions.net
Subject: Re: [PATCH v3 1/1] ynl: samples: add tc filter example
Date: Tue, 18 Nov 2025 18:37:43 -0800 [thread overview]
Message-ID: <20251118183743.48be61e0@kernel.org> (raw)
In-Reply-To: <20251117105708.133020-2-zahari.doychev@linux.com>
On Mon, 17 Nov 2025 11:57:08 +0100 Zahari Doychev wrote:
> + if (tc_clsact_add(ys, ifi))
> + goto err_destroy;
> +
> + tc_filter_config(ys, ifi);
> +
> + tc_clsact_del(ys, ifi);
> +
> +err_destroy:
> + ynl_sock_destroy(ys);
> + return 2;
Let's return 0 if nothing failed? Maybe:
if (tc_clsact_add(ys, ifi)) {
ret = 2;
goto err_destroy;
}
ret = 0;
if (tc_filter_config(ys, ifi))
ret = 3;
if (tc_clsact_del(ys, ifi))
ret = 4;
err_destroy:
ynl_sock_destroy(ys);
return ret;
}
--
pw-bot: cr
prev parent reply other threads:[~2025-11-19 2:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 10:57 [PATCH v3 0/1] add tc filter example Zahari Doychev
2025-11-17 10:57 ` [PATCH v3 1/1] ynl: samples: " Zahari Doychev
2025-11-19 2:37 ` Jakub Kicinski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251118183743.48be61e0@kernel.org \
--to=kuba@kernel.org \
--cc=ast@fiberby.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=johannes@sipsolutions.net \
--cc=matttbe@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=xiyou.wangcong@gmail.com \
--cc=zahari.doychev@linux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.