From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0958DA04DB; Thu, 15 Oct 2020 09:08:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DF98C1DCCF; Thu, 15 Oct 2020 09:08:08 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id CF22F1DCCE for ; Thu, 15 Oct 2020 09:08:07 +0200 (CEST) IronPort-SDR: JJskFTU3WMFp62HdoGkhulbMyILUKU2SNRS7kBpsjd+u1m/S715nl/1bEquqimDnEcrZnlNMX+ X3G48f8wQcJQ== X-IronPort-AV: E=McAfee;i="6000,8403,9774"; a="166340861" X-IronPort-AV: E=Sophos;i="5.77,378,1596524400"; d="scan'208";a="166340861" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2020 00:08:05 -0700 IronPort-SDR: Miz9SGxHQjnGLPahEeoObF/pEqAs84MTu+uDw1EwLPu5NT6GveTbxAxC3NdFIkBsjLX8AXLP2q AJd7lQtnTqgg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,378,1596524400"; d="scan'208";a="314411541" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga003.jf.intel.com with ESMTP; 15 Oct 2020 00:08:05 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 15 Oct 2020 00:08:05 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 15 Oct 2020 00:08:04 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 15 Oct 2020 00:08:04 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 15 Oct 2020 00:08:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bJZ2V+tRt8pDX9iUF8AEsZ8G2uf4fF3mPFIp9vji3Y0Y3e66rWQwX8MNWBRAgMprBFpqPlYNyXgWRFcL4bsLr/5l/W95IPWMCD2KcOB+KSbVG+Pbr5I0a6fu4bljyZ6G1T0MH/wwux9JbIcHiVFnX2K0+6upWq7e5MGe89wG5u/UuW10EgETknyTIhFUWRgGu3GKxgiEjUiXprHWQ5zLmbJxpYf/EPGB1gD0AudV52eEMR3/Re7hXeAg36aw5iZYBjWrT2ScElFtM/QIo9F1PdZ5fyoUvDzbf1787pwV3+PrjXECDfviyBSJzEI81b6LvhaqsGS4qP1KsIh90cYTnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jxTIjieChkXx5GcORDwKnlUuwAfWvlvXbdev9dhz86Q=; b=CZehZP01K2/2gsHL16D1XH0NhdO6LNf0/dPyKjytXewN3qnk1S3NHhSgLfjVqxJQFpOAPx/oZTbgm28pT0UOCywDTBG5H9DAGfIxA3nylS09cfB3kpMBhrzi0eEnmJLFd8prmXMb0aq7w4i5zoSyoA8OAp2bhHEw6GdukCusk+fk0v+hYUfYek4oK6pB98br7UghHvRcWOGYjDSybNgXCWCZ9+PzmQ83zj+tMuTuNnN5yG/cOHBKPs1uebJz4Y2Wmv4VEWYC/dJ5t8deak8/gv6TRF9v/7EiG99IxTkUBDEe1ITd5NZCoeVcBt+z/3ctTgA1zaTzwy0Y2jyrB7kkXw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jxTIjieChkXx5GcORDwKnlUuwAfWvlvXbdev9dhz86Q=; b=JJuky47tdf+986uWmLcdLjeyUXlt8/51fqUqAP15TSf9BIPPpcrTyytplyDhmHNcwnUwIiLGc+LqyOtb/x21QwjMUymcqpy9zqG1vxd+vOwhvNCUUR+tT+M5E3GVpAe5LPXwpTLo+/k+uOwEmTLfQBcJ9pOp7uMabFin/tY9/M8= Received: from BN6PR11MB4035.namprd11.prod.outlook.com (2603:10b6:405:7a::38) by BN6PR11MB3906.namprd11.prod.outlook.com (2603:10b6:405:78::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20; Thu, 15 Oct 2020 07:08:00 +0000 Received: from BN6PR11MB4035.namprd11.prod.outlook.com ([fe80::b54c:c80:ccd1:5950]) by BN6PR11MB4035.namprd11.prod.outlook.com ([fe80::b54c:c80:ccd1:5950%5]) with mapi id 15.20.3477.020; Thu, 15 Oct 2020 07:08:00 +0000 From: "Su, Simei" To: "Zhang, Qi Z" , "Yang, Qiming" CC: "dev@dpdk.org" , "Wang, Haiyue" , "Xing, Beilei" , "Ding, Xuan" Thread-Topic: [PATCH v3 3/3] net/ice: support ACL filter in DCF Thread-Index: AQHWogi8bd9cUbL8mE6DTIomVbgxj6mYHw2AgAAftPA= Date: Thu, 15 Oct 2020 07:08:00 +0000 Message-ID: References: <20200929015632.109364-1-simei.su@intel.com> <20201014085415.177872-1-simei.su@intel.com> <20201014085415.177872-4-simei.su@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.201] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0df78c58-f6ca-4dbe-f017-08d870d90d5b x-ms-traffictypediagnostic: BN6PR11MB3906: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1122; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: S9C0wjQHZLEdhAggFJpNblZG9+FFaDbyHJCFi7ezxan7tNTGZJnTNVRT/LjYIVbk5/s3QcwQYDcfzYkpveWaOiXemQUdZOJu5Icfzry5u+reE3p7b0ZmRdtamNacSFSmtFIW+959BZAc+O5jDUB3hzs/56nsz/StowiHD+VRsqtI/Vz+v5XZzCJpUA7jt479IwjriBcF33oidr35Awj4W60qjpn10OpfEZmGpO0YSz5tP6xh0Fwz4FKeFBGN8JRqc2ezRSnI+PNsDbP0IcuIbm/MvFDMa9LyiTPxLdNRpEos6xXasEO0OlmF1uBVzh3KsswaHryLUPOepi7RalM7zg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB4035.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(376002)(136003)(396003)(39860400002)(366004)(5660300002)(83380400001)(4326008)(316002)(110136005)(7696005)(54906003)(71200400001)(478600001)(55016002)(52536014)(86362001)(76116006)(66476007)(107886003)(66556008)(26005)(186003)(66446008)(53546011)(6506007)(9686003)(8676002)(6636002)(8936002)(33656002)(64756008)(66946007)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: UMVRBLQ8tvjb3J47b+R4tnHjIe611T9jbnRb/GIesQYoHJPE6xJuAHn0sj0eGJwAxNPDb7BfRo/lR4mOvBMmrwD2PhkDCQGtLtngEXvv760Gxn7NuuRwQ68WZP8Pn7+2sAiwAQIuI+bOBeVUx6bINrh70ZiqN7R9bUEZiGbc8rVWRJOioso3SluFnaOzR0ekSKG6ycGbKBvwMOl5xYaaxzaJKNcm4L9ID5cFXQvzBBb+YWOSuxrOXrJkLzyYgXgX4CdD54YFYSy7S1Vn5Q20HrmFekTNKcwN2szINraXDpExTwzDrkOFuD8tQ1RDDdW9x9nNHMIxWSSOwXAZ083CYyD7WNqC6hY/Mhlw2skK7xfK2ox+Ci6ds3IaFeIjljvDkrz9O8R2IAATujQw3G7cC7g/vzlmUNwQ89pEVRFhP8xUYrf2J2SMB1RTmCORDuOWcUH1Z9e1NefWbwTD7QXXUL8sIateXhZANtvjYIkcLcRKu8T7pg1TfvtWbOdrSjIBKL2YnOxwvlu5TN2TTvS9fGqvU7nPn1yMfHzfa9ifijYYG5AR2NNcGTSJyFch16hrA+YQRg1l7foTt4qYcaTx7mFo3QR8C8Q+9TL+Xch2hU3BJoKgM3oEvvBlzuhc1Uiy/uCcfjwdRJhiXTIpBXACIQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN6PR11MB4035.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0df78c58-f6ca-4dbe-f017-08d870d90d5b X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2020 07:08:00.6488 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: l57aCm77CtVTV+U7PZdZDsRkPP9hP5Kgbpy4YCvDQihTE2RXBayXIMVgTvycylEIFXbgV2pt2Peat3YP8UaiDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB3906 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 3/3] net/ice: support ACL filter in DCF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Qi > -----Original Message----- > From: Zhang, Qi Z > Sent: Thursday, October 15, 2020 1:11 PM > To: Su, Simei ; Yang, Qiming > Cc: dev@dpdk.org; Wang, Haiyue ; Xing, Beilei > ; Ding, Xuan > Subject: RE: [PATCH v3 3/3] net/ice: support ACL filter in DCF >=20 > some minor captures >=20 > > -----Original Message----- > > From: Su, Simei > > Sent: Wednesday, October 14, 2020 4:54 PM > > To: Zhang, Qi Z ; Yang, Qiming > > > > Cc: dev@dpdk.org; Wang, Haiyue ; Xing, Beilei > > ; Ding, Xuan ; Su, Simei > > > > Subject: [PATCH v3 3/3] net/ice: support ACL filter in DCF > > > > Add ice_acl_create_filter to create a rule and ice_acl_destroy_filter > > to destroy a rule. If a flow is matched by ACL filter, filter rule > > will be set to HW. Currently IPV4/IPV4_UDP/IPV4_TCP/IPV4_SCTP pattern > and drop action are supported. > > > > Signed-off-by: Simei Su > > Signed-off-by: Xuan Ding > > --- > > doc/guides/rel_notes/release_20_11.rst | 6 + > > drivers/net/ice/ice_acl_filter.c | 1034 > > ++++++++++++++++++++++++++++++++ > > drivers/net/ice/ice_ethdev.h | 17 + > > drivers/net/ice/ice_generic_flow.c | 2 + > > drivers/net/ice/meson.build | 3 +- > > 5 files changed, 1061 insertions(+), 1 deletion(-) create mode > > 100644 drivers/net/ice/ice_acl_filter.c > > > > diff --git a/doc/guides/rel_notes/release_20_11.rst > > b/doc/guides/rel_notes/release_20_11.rst > > index e8ae4d4..6cf1ef8 100644 > > --- a/doc/guides/rel_notes/release_20_11.rst > > +++ b/doc/guides/rel_notes/release_20_11.rst > ... >=20 > > +#define MAX_ACL_SLOTS_ID 2048 > > + > > +#define ICE_ACL_INSET_ETH_IPV4 ( \ > > +ICE_INSET_SMAC | ICE_INSET_DMAC | \ > > +ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST) #define > > +ICE_ACL_INSET_ETH_IPV4_UDP ( \ ICE_INSET_SMAC | ICE_INSET_DMAC | \ > > +ICE_INSET_IPV4_SRC | ICE_INSET_IPV4_DST | \ ICE_INSET_UDP_SRC_PORT > | > > +ICE_INSET_UDP_DST_PORT) >=20 >=20 > Better to reuse ICE_ACL_INSET_ETH_IPV4 in ICE_ACL_INSET_ETH_IPV4_UDP Ok, will simplify it in v4. >=20 > ... > > +static void > > +acl_prof_helper_function(struct ice_hw *hw, struct ice_flow_seg_info *= seg, >=20 > The function is always used before ice_add_prof, so better rename to > acl_add_prof_prepare. Ok, will rename it in next version. >=20 > > + bool is_l4, uint16_t src_port, uint16_t dst_port) { > > +uint16_t val_loc, mask_loc; > > + > > +ret =3D ice_acl_parse_action(ad, actions, error, filter); > > +if (ret) > > +goto error; > > + > > +if (meta) > > +*meta =3D filter; > > + > > +error: > > +rte_free(item); > > +return ret; > > +} > > + > .... >=20 > > > > +struct ice_acl_conf { > > +struct ice_fdir_fltr input; > > +uint64_t input_set; > > +}; > > + > > +/** > > + * A structure used to define fields of ACL related info. > > + */ > > +struct ice_acl_info { > > +struct ice_acl_conf conf; > > +}; > > + > > struct ice_pf { > > struct ice_adapter *adapter; /* The adapter this PF associate to */ > > struct ice_vsi *main_vsi; /* pointer to main VSI structure */ @@ -421,= 6 > > +435,7 @@ struct ice_pf { > > uint16_t fdir_nb_qps; /* The number of queue pairs of Flow Director */ > > uint16_t fdir_qp_offset; > > struct ice_fdir_info fdir; /* flow director info */ > > +struct ice_acl_info acl; /* ACL info */ > > struct ice_hash_ctx hash_ctx; > > uint16_t hw_prof_cnt[ICE_FLTR_PTYPE_MAX][ICE_FD_HW_SEG_MAX]; > > uint16_t fdir_fltr_cnt[ICE_FLTR_PTYPE_MAX][ICE_FD_HW_SEG_MAX]; > > @@ -440,6 +455,8 @@ struct ice_pf { > > uint64_t old_rx_bytes; > > uint64_t old_tx_bytes; > > uint64_t supported_rxdid; /* bitmap for supported RXDID */ > > +struct rte_bitmap *slots; > > +uint64_t hw_entry_id[MAX_ACL_ENTRIES]; >=20 > Can we move above 2 fields into ice_acl_info? >=20 > > }; Yes, we can. > > > > >=20