Thread (1 message) 1 message, 1 author, 2020-06-15

Re: [RFC PATCH bpf-next 1/8] libbpf: generalize libbpf externs support

From: Andrii Nakryiko <hidden>
Date: 2020-06-15 18:55:37
Also in: bpf

On Mon, Jun 15, 2020 at 9:44 AM Hao Luo [off-list ref] wrote:
Andrii,

Thanks for this patch, it looks very nice! Decoupling kconfig from generic externs is much needed.

On Fri, Jun 12, 2020 at 3:34 PM Andrii Nakryiko [off-list ref] wrote:
quoted
Switch existing Kconfig externs to be just one of few possible kinds of more
generic externs. This refactoring is in preparation for ksymbol extern
support, added in the follow up patch. There are no functional changes
intended.

Signed-off-by: Andrii Nakryiko <redacted>
---
 tools/lib/bpf/libbpf.c | 332 ++++++++++++++++++++++++-----------------
 1 file changed, 199 insertions(+), 133 deletions(-)
[...]
quoted
@@ -1443,12 +1454,12 @@ static int set_ext_value_tri(struct extern_desc *ext, void *ext_val,
                else /* value == 'n' */
                        *(enum libbpf_tristate *)ext_val = TRI_NO;
                break;
-       case EXT_CHAR:
+       case KCFG_CHAR:
                *(char *)ext_val = value;
                break;
-       case EXT_UNKNOWN:
-       case EXT_INT:
-       case EXT_CHAR_ARR:
+       case KCFG_UNKNOWN:
+       case KCFG_INT:
+       case KCFG_CHAR_ARR:
        default:
                pr_warn("extern %s=%c should be bool, tristate, or char\n",
                        ext->name, value);

Very minor: pr_warn("kconfig extern ..."); I noticed you have one similar message changed below.
yeah, good catch, I'll update
quoted
@@ -1458,12 +1469,12 @@ static int set_ext_value_tri(struct extern_desc *ext, void *ext_val,
        return 0;
 }
for the future, please cut irrelevant parts of the patch, makes it
easier to see where your replies are

[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help