lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 3 Jun 2023 10:15:22 -0400
From: Jamal Hadi Salim <jhs@...atatu.com>
To: Marcelo Ricardo Leitner <mleitner@...hat.com>
Cc: netdev@...r.kernel.org, deb.chatterjee@...el.com, anjali.singhai@...el.com, 
	namrata.limaye@...el.com, tom@...anda.io, p4tc-discussions@...devconf.info, 
	Mahesh.Shirshyad@....com, Vipin.Jain@....com, tomasz.osinski@...el.com, 
	jiri@...nulli.us, xiyou.wangcong@...il.com, davem@...emloft.net, 
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, vladbu@...dia.com, 
	simon.horman@...igine.com, khalidm@...dia.com, toke@...hat.com
Subject: Re: [PATCH RFC v2 net-next 14/28] p4tc: add table create, update,
 delete, get, flush and dump

On Fri, Jun 2, 2023 at 5:54 PM Marcelo Ricardo Leitner
<mleitner@...hat.com> wrote:
>
> On Wed, May 17, 2023 at 07:02:18AM -0400, Jamal Hadi Salim wrote:
> ...
> > ___Initial Table Entries___
> ...
> > They would get:
> >
> > pipeline id 22
> >     table id 1
> >     table name cb/tname
> >     key_sz 64
> >     max entries 256
> >     masks 8
> >     table entries 1
> >     permissions CRUD--R--X
> >     entry:
> >         table id 1
> >         entry priority 17
> >         key blob    101010a0a0a0a
> >         mask blob   ffffff00ffffff
>
> I'm wondering how these didn't align. Perhaps key had an extra 0 to
> the left? It would be nice to right-align it.

It would also help if we prefixed with "0x". The hard part would be to
use proper format for variable sized fields. Yes i think the zero in
this case is not displayed. We actually should fix this example
because the (compiler) generated introspection file helps us make this
more readable so we dont need to print it in hex. Slightly different
example.
-----
pipeline:  redirect_srcip(id 1)
 table: MainControlImpl/nh_table(id 1)entry priority 1[permissions -RUD--R--X]
    entry key
        srcAddr id:1 size:32b type:ipv4 exact fieldval  200.221.244.192/32
    created by: tc (id 2)
    created 178 sec    used 178 sec
----

The json output (with -j) looks prettier.
---
[
  {
    "pname": "redirect_srcip",
    "pipeid": 1
  },
  {
    "entries": [
      {
        "tblname": "MainControlImpl/nh_table",
        "tblid": 1,
        "prio": 1,
        "permissions": "-RUD--R--X",
        "key": [
          {
            "keyfield": "srcAddr",
            "id": 1,
            "width": 32,
            "type": "ipv4",
            "match_type": "exact",
            "fieldval": "200.221.244.192/32"
          }
        ],
        "create_whodunnit": "tc",
        "create_whodunnit_id": 2,
        "created": 88,
        "last_used": 88
      }
    ]
  }
-----

We'll fix the typos you found.

cheers,
jamal


> >         create whodunnit tc
> >         permissions -RUD--R--X
> >
> ...
> > +static int tcf_key_try_set_state_ready(struct p4tc_table_key *key,
> > +                                    struct netlink_ext_ack *extack)
> > +{
> > +     if (!key->key_acts) {
> > +             NL_SET_ERR_MSG(extack,
> > +                            "Table key must have actions before sealing pipelline");
>
> While at it, so that I don't forget stuff..
> s/pipelline/pipeline/
>
> > +             return -EINVAL;
> > +     }
> > +
> > +     return 0;
> > +}
> > +
> > +static int __tcf_table_try_set_state_ready(struct p4tc_table *table,
> > +                                        struct netlink_ext_ack *extack)
> > +{
> > +     int i;
> > +     int ret;
> > +
> > +     if (!table->tbl_postacts) {
> > +             NL_SET_ERR_MSG(extack,
> > +                            "All tables must have postactions before sealing pipelline");
>
> Same.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ