From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E022C282D7 for ; Sat, 2 Feb 2019 11:51:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DB49E20818 for ; Sat, 2 Feb 2019 11:51:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727589AbfBBLvM (ORCPT ); Sat, 2 Feb 2019 06:51:12 -0500 Received: from mail.us.es ([193.147.175.20]:44966 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfBBLvM (ORCPT ); Sat, 2 Feb 2019 06:51:12 -0500 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id E9660C51D6 for ; Sat, 2 Feb 2019 12:51:07 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id D8E3EDA86C for ; Sat, 2 Feb 2019 12:51:07 +0100 (CET) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id D7BB1DA85D; Sat, 2 Feb 2019 12:51:07 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 4333BDA846; Sat, 2 Feb 2019 12:51:05 +0100 (CET) Received: from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int (F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); Sat, 02 Feb 2019 12:51:05 +0100 (CET) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int) Received: from salvia.here (sys.soleta.eu [212.170.55.40]) (Authenticated sender: pneira@us.es) by entrada.int (Postfix) with ESMTPA id DEFC34265A2F; Sat, 2 Feb 2019 12:51:03 +0100 (CET) X-SMTPAUTHUS: auth mail.us.es From: Pablo Neira Ayuso To: netdev@vger.kernel.org Cc: davem@davemloft.net, thomas.lendacky@amd.com, f.fainelli@gmail.com, ariel.elior@cavium.com, michael.chan@broadcom.com, santosh@chelsio.com, madalin.bucur@nxp.com, yisen.zhuang@huawei.com, salil.mehta@huawei.com, jeffrey.t.kirsher@intel.com, tariqt@mellanox.com, saeedm@mellanox.com, jiri@mellanox.com, idosch@mellanox.com, jakub.kicinski@netronome.com, peppe.cavallaro@st.com, grygorii.strashko@ti.com, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, alexandre.torgue@st.com, joabreu@synopsys.com, linux-net-drivers@solarflare.com, ganeshgr@chelsio.com, ogerlitz@mellanox.com, Manish.Chopra@cavium.com, marcelo.leitner@gmail.com, mkubecek@suse.cz, venkatkumar.duvvuru@broadcom.com, julia.lawall@lip6.fr, john.fastabend@gmail.com, netfilter-devel@vger.kernel.org, cphealy@gmail.com Subject: [PATCH 00/12 net-next,v7] add flow_rule infrastructure Date: Sat, 2 Feb 2019 12:50:42 +0100 Message-Id: <20190202115054.4880-1-pablo@netfilter.org> X-Mailer: git-send-email 2.11.0 X-Virus-Scanned: ClamAV using ClamSMTP Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi, This patchset, as is, allows us to reuse the driver codebase to configure ACL hardware offloads for the ethtool_rxnfc and the TC flower interfaces. A few clients for this infrastructure are presented, such as the bcm_sf2 and the qede drivers, for reference. Moreover all of the existing drivers in the tree are converted to use this infrastructure. This patchset is re-using the existing flow dissector infrastructure that was introduced by Jiri Pirko et al. so the amount of abstractions that this patchset adds are minimal. Well, just a few wrapper structures for the selector side of the rules. And, in order to express actions, this patchset exposes an action API that is based on the existing TC action infrastructure and what existing drivers already support on that front. v7: This patchset is a rebase on top of the net-next tree, after addressing questions and feedback from driver developers in the last batch. Please, apply. Thanks! P.S: I would like to thank driver developers for their fruitful cooperation and feedback, which has been very useful to shape the layout of this incremental work on top of the existing infrastructure. Thanks! Pablo Neira Ayuso (12): flow_offload: add flow_rule and flow_match structures and use them net/mlx5e: support for two independent packet edit actions flow_offload: add flow action infrastructure cls_api: add translator to flow_action representation flow_offload: add statistics retrieval infrastructure and use it drivers: net: use flow action infrastructure cls_flower: don't expose TC actions to drivers anymore flow_offload: add wake-up-on-lan and queue to flow_action ethtool: add ethtool_rx_flow_spec to flow_rule structure translator dsa: bcm_sf2: use flow_rule infrastructure qede: place ethtool_rx_flow_spec after code after TC flower codebase qede: use ethtool_rx_flow_rule() to remove duplicated parser code drivers/net/dsa/bcm_sf2_cfp.c | 102 +-- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 252 ++++---- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 450 ++++++------- drivers/net/ethernet/intel/i40e/i40e_main.c | 178 ++---- drivers/net/ethernet/intel/iavf/iavf_main.c | 195 +++--- drivers/net/ethernet/intel/igb/igb_main.c | 64 +- .../net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 68 +- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 698 ++++++++++----------- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 2 +- .../net/ethernet/mellanox/mlxsw/spectrum_flower.c | 258 ++++---- drivers/net/ethernet/netronome/nfp/flower/action.c | 198 +++--- drivers/net/ethernet/netronome/nfp/flower/match.c | 417 ++++++------ .../net/ethernet/netronome/nfp/flower/offload.c | 154 ++--- drivers/net/ethernet/qlogic/qede/qede_filter.c | 572 +++++++---------- include/linux/ethtool.h | 15 + include/net/flow_offload.h | 203 ++++++ include/net/pkt_cls.h | 16 +- net/core/Makefile | 2 +- net/core/ethtool.c | 241 +++++++ net/core/flow_offload.c | 153 +++++ net/sched/cls_api.c | 116 ++++ net/sched/cls_flower.c | 71 ++- 22 files changed, 2416 insertions(+), 2009 deletions(-) create mode 100644 include/net/flow_offload.h create mode 100644 net/core/flow_offload.c -- 2.11.0 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: [PATCH 00/12 net-next,v7] add flow_rule infrastructure Date: Sat, 2 Feb 2019 12:50:42 +0100 Message-ID: <20190202115054.4880-1-pablo@netfilter.org> Cc: davem@davemloft.net, thomas.lendacky@amd.com, f.fainelli@gmail.com, ariel.elior@cavium.com, michael.chan@broadcom.com, santosh@chelsio.com, madalin.bucur@nxp.com, yisen.zhuang@huawei.com, salil.mehta@huawei.com, jeffrey.t.kirsher@intel.com, tariqt@mellanox.com, saeedm@mellanox.com, jiri@mellanox.com, idosch@mellanox.com, jakub.kicinski@netronome.com, peppe.cavallaro@st.com, grygorii.strashko@ti.com, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, alexandre.torgue@st.com, joabreu@synopsys.com, linux-net-drivers@solarflare.com, ganeshgr@chelsio.com, ogerlitz@mellanox.com, Manish.Chopra@cavium.com, marcelo.leitner@gmail.com, mkubecek@suse.cz, venkatkumar.duvvuru@broadcom.com, julia.lawall@lip6.fr, john.fastabend@gmail.com, netfilter-devel@vger.kernel.org, cphealy@gmail.co To: netdev@vger.kernel.org Return-path: Sender: netdev-owner@vger.kernel.org List-Id: netfilter-devel.vger.kernel.org Hi, This patchset, as is, allows us to reuse the driver codebase to configure ACL hardware offloads for the ethtool_rxnfc and the TC flower interfaces. A few clients for this infrastructure are presented, such as the bcm_sf2 and the qede drivers, for reference. Moreover all of the existing drivers in the tree are converted to use this infrastructure. This patchset is re-using the existing flow dissector infrastructure that was introduced by Jiri Pirko et al. so the amount of abstractions that this patchset adds are minimal. Well, just a few wrapper structures for the selector side of the rules. And, in order to express actions, this patchset exposes an action API that is based on the existing TC action infrastructure and what existing drivers already support on that front. v7: This patchset is a rebase on top of the net-next tree, after addressing questions and feedback from driver developers in the last batch. Please, apply. Thanks! P.S: I would like to thank driver developers for their fruitful cooperation and feedback, which has been very useful to shape the layout of this incremental work on top of the existing infrastructure. Thanks! Pablo Neira Ayuso (12): flow_offload: add flow_rule and flow_match structures and use them net/mlx5e: support for two independent packet edit actions flow_offload: add flow action infrastructure cls_api: add translator to flow_action representation flow_offload: add statistics retrieval infrastructure and use it drivers: net: use flow action infrastructure cls_flower: don't expose TC actions to drivers anymore flow_offload: add wake-up-on-lan and queue to flow_action ethtool: add ethtool_rx_flow_spec to flow_rule structure translator dsa: bcm_sf2: use flow_rule infrastructure qede: place ethtool_rx_flow_spec after code after TC flower codebase qede: use ethtool_rx_flow_rule() to remove duplicated parser code drivers/net/dsa/bcm_sf2_cfp.c | 102 +-- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 252 ++++---- .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 450 ++++++------- drivers/net/ethernet/intel/i40e/i40e_main.c | 178 ++---- drivers/net/ethernet/intel/iavf/iavf_main.c | 195 +++--- drivers/net/ethernet/intel/igb/igb_main.c | 64 +- .../net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 68 +- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 698 ++++++++++----------- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c | 2 +- .../net/ethernet/mellanox/mlxsw/spectrum_flower.c | 258 ++++---- drivers/net/ethernet/netronome/nfp/flower/action.c | 198 +++--- drivers/net/ethernet/netronome/nfp/flower/match.c | 417 ++++++------ .../net/ethernet/netronome/nfp/flower/offload.c | 154 ++--- drivers/net/ethernet/qlogic/qede/qede_filter.c | 572 +++++++---------- include/linux/ethtool.h | 15 + include/net/flow_offload.h | 203 ++++++ include/net/pkt_cls.h | 16 +- net/core/Makefile | 2 +- net/core/ethtool.c | 241 +++++++ net/core/flow_offload.c | 153 +++++ net/sched/cls_api.c | 116 ++++ net/sched/cls_flower.c | 71 ++- 22 files changed, 2416 insertions(+), 2009 deletions(-) create mode 100644 include/net/flow_offload.h create mode 100644 net/core/flow_offload.c -- 2.11.0