All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Thomas Haller <thaller@redhat.com>
Cc: NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft 1/2] json: implement json() hook for "symbol_expr_ops"/"variabl_expr_ops"
Date: Thu, 2 Nov 2023 12:24:42 +0100	[thread overview]
Message-ID: <ZUOG+sXwE6E7y9dc@calendula> (raw)
In-Reply-To: <20231102112122.383527-1-thaller@redhat.com>

On Thu, Nov 02, 2023 at 12:20:28PM +0100, Thomas Haller wrote:
> The ultimate goal is that all "struct expr_ops" have a "json()" hook
> set.
> 
> It's also faster, to just create the JSON node, instead of creating a
> memory stream, write there using print only to get the sting.
> 
> Signed-off-by: Thomas Haller <thaller@redhat.com>
> ---
> The patches 1/2 and 2/2 replaces
> 
>   Subject:	[PATCH nft 2/7] json: drop messages "warning: stmt ops chain have no json callback"
>   Date:	Tue, 31 Oct 2023 19:53:28 +0100
> 
>  include/json.h   |  4 ++++
>  src/expression.c |  2 ++
>  src/json.c       | 10 ++++++++++
>  3 files changed, 16 insertions(+)
> 
> diff --git a/include/json.h b/include/json.h
> index 39be8928e8ee..134e503afe54 100644
> --- a/include/json.h
> +++ b/include/json.h
> @@ -49,7 +49,9 @@ json_t *rt_expr_json(const struct expr *expr, struct output_ctx *octx);
>  json_t *numgen_expr_json(const struct expr *expr, struct output_ctx *octx);
>  json_t *hash_expr_json(const struct expr *expr, struct output_ctx *octx);
>  json_t *fib_expr_json(const struct expr *expr, struct output_ctx *octx);
> +json_t *symbol_expr_json(const struct expr *expr, struct output_ctx *octx);
>  json_t *constant_expr_json(const struct expr *expr, struct output_ctx *octx);
> +json_t *variable_expr_json(const struct expr *expr, struct output_ctx *octx);

Makes no sense.

Are these expression really triggering specifically errors? I don't
think so.

This expressions are consumed, ie. the get transformed into a
value_expr, but never use in an output path.

      parent reply	other threads:[~2023-11-02 11:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 11:20 [PATCH nft 1/2] json: implement json() hook for "symbol_expr_ops"/"variabl_expr_ops" Thomas Haller
2023-11-02 11:20 ` [PATCH nft 2/2] json: drop handling missing json() hook for "struct expr_ops" Thomas Haller
2023-11-02 11:27   ` Pablo Neira Ayuso
2023-11-02 14:09     ` Thomas Haller
2023-11-02 15:54       ` Pablo Neira Ayuso
2023-11-02 16:17         ` Thomas Haller
2023-11-02 20:51           ` Pablo Neira Ayuso
2023-11-03  8:45             ` Thomas Haller
2023-11-03 11:53               ` Pablo Neira Ayuso
2023-11-03 12:19                 ` Florian Westphal
2023-11-03 15:16                   ` Pablo Neira Ayuso
2023-11-03 12:14               ` Florian Westphal
2023-11-02 17:39   ` Thomas Haller
2023-11-02 19:49     ` Thomas Haller
2023-11-02 11:24 ` Pablo Neira Ayuso [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=ZUOG+sXwE6E7y9dc@calendula \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=thaller@redhat.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.