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-next>] [day] [month] [year] [list]
Message-ID: <a3f0a79a-7e2c-4cdc-8c97-dfebe959ab1f@solarflare.com>
Date:   Tue, 4 Jun 2019 18:32:33 +0100
From:   Edward Cree <ecree@...arflare.com>
To:     Jamal Hadi Salim <jhs@...atatu.com>, Jiri Pirko <jiri@...nulli.us>,
        "Pablo Neira Ayuso" <pablo@...filter.org>,
        David Miller <davem@...emloft.net>
CC:     netdev <netdev@...r.kernel.org>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Andy Gospodarek <andy@...yhouse.net>,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Michael Chan <michael.chan@...adcom.com>,
        Vishal Kulkarni <vishal@...lsio.com>,
        Or Gerlitz <gerlitz.or@...il.com>
Subject: [RFC PATCH v4 net-next 0/4] flow_offload: Re-add per-action
 statistics

When the flow_offload infrastructure was added, per-action statistics,
 which were previously possible for drivers to support in TC offload,
 were not plumbed through, perhaps because the drivers in the tree did
 not implement them.
In TC (and in the previous offload API) statistics are per-action,
 though generally only on 'delivery' actions like mirred, ok and shot.
 Actions also have an index, which may be supplied by the user, which
 allows the sharing of entities such as counters between multiple rules.
The existing driver implementations did not support this, however,
 instead allocating a single counter per rule.  The flow_offload API did
 not support this either, as (a) the information that two actions were
 actually the same action never reached the driver, and (b) the
 TC_CLSFLOWER_STATS callback is only able to return a single set of
 stats, which are added to all counters for actions on the rule.
Patch #1 of this series fixes (a) by adding a cookie member to struct
 flow_action_entry, while the remaining patches fix (b) by adding a per-
 action offload callback (TC_SETUP_ACTION/TC_ACTION_STATS) for
 RTM_GETACTION, and also (patch #4) calling it for each action when
 dumping a rule.
For drivers supporting per-action stats (of which none yet exist
 upstream, hence RFC), this also means that RTM_GETACTION will return
 up-to-date stats, rather than stale values from the last time the rule
 was dumped.

Changed in v4:
* Incorporated RTM_GETACTION offload series
* Replaced TC_CLSFLOWER_STATS stats-array with multiple TC_SETUP_ACTION
  callbacks
* dropped header inclusion fix (submitted separately)
* re-added RFC tags

Changed in v3:
* replaced action_index with cookie, so drivers don't have to look at
  flow_action_id to distinguish shared actions
* removed RFC tags

Changed in v2:
* use array instead of new callback for getting stats
* remove CVLAN patch (posted separately for net)
* add header inclusion fix

Edward Cree (4):
  flow_offload: add a cookie to flow_action_entry
  net/sched: add callback to get stats on an action from clsflower
    offload
  net/sched: add action block binding to other classifiers
  net/sched: call action stats offload in flower or mall dump

 include/linux/netdevice.h  |  1 +
 include/net/act_api.h      |  7 +++++-
 include/net/flow_offload.h |  2 ++
 include/net/pkt_cls.h      | 18 ++++++++++++++
 net/sched/act_api.c        | 51 ++++++++++++++++++++++++++++++++++++++
 net/sched/cls_api.c        |  2 ++
 net/sched/cls_bpf.c        | 10 +++++++-
 net/sched/cls_flower.c     | 13 ++++++++++
 net/sched/cls_matchall.c   | 12 +++++++++
 net/sched/cls_u32.c        |  7 ++++++
 10 files changed, 121 insertions(+), 2 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ