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 049F6A0562; Tue, 31 Mar 2020 09:05:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B4F631BFC1; Tue, 31 Mar 2020 09:05:36 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 24D6A2BCE for ; Tue, 31 Mar 2020 09:05:34 +0200 (CEST) IronPort-SDR: DnAEpaZA0YgrXoPvRRaGQQKADjBaPzA0jyL7pdg44uioKqenDaMA9Y3L6vTcFSxyuUTanqqumq iMDV95zyWPEw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2020 00:05:34 -0700 IronPort-SDR: 8YFTkeoA3DogQ6/4GHUpAJVYUnCLEbmtD5Qv6x8p225+haKQzE3+Oo+oObo5LG25u4HWK+6Yoh i+Y240A6HQaA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,327,1580803200"; d="scan'208";a="237615156" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga007.jf.intel.com with ESMTP; 31 Mar 2020 00:05:33 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 31 Mar 2020 00:05:33 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 31 Mar 2020 00:05:33 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.102) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 31 Mar 2020 00:05:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AG05Hr5p6yc7HESLa67E3g0p4QUK7CfYR+bQyshfXs2zxzVzQOABsNUXrOFs7pds9G6gKhr0XlctkTpGq96JOg8JzCgqx+/hq3EC2rDSR16ghvI+P/5wATxJCk22xBpaJKM80K6eCdzycp+P5FSlseLaHNq+nEVFEb4dSjtEcFFsNmh2R+xYe4aVM8PbGTsS6SDhfWLV1P5IY766q6OYG+mjtO13Iq+SIh2afJVoSqRwKbj9BDJ0vf+2XJTmszELoiiiDhkXrg0hXK34oaJm5yODA1S98V2474zPBXgOk9eF8r38ncF4/XzxuQiplo22coIyin9Xgg9IBkpXFmEfCw== 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=+4o6UxJjFsMEVk3N4MX4/VHBgoRit02OVVm9TH6zxzE=; b=HDQD7Xd74SQB8PoBKIl6OBqYokl2GvjC9io8Xtafl4NgR0aap9XXPvhL9tReJPzOwqXKDDCpib8e5R/Z9DjaBQvDEBmrY1mh+9aPD/KSYO4gLPenmxQvMOGIe+JM6k4rtpZzvQ1ijFkzZ9Pf8ciJJYliU5RpsnPJ7+upKJPFXYpdVp88+WcnhCz5H+0vk1K/kCRz2ny6mSim2z6tlbj2QX2ypUTTGn3oPsHxnIZGILlzT1VkPf/AVj7ScMHopo9nFE5DIwaYvaES/urfQhUo1ogy5MGw/N3/YI3/burFQMHgLCbEAFhpwpzPSbrhUeJqHAA+WFnlGDeWFYii8fc9tg== 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=+4o6UxJjFsMEVk3N4MX4/VHBgoRit02OVVm9TH6zxzE=; b=PtWRSFeCgRWf6EVihoGg3Ro6kDrZ6Zei49ss8VPRBtL09WcGll/hp8nJsj1KEhTzVuk2TmaH3CwO+qG2yMFhOyjL2/0FhOF+GjIbhWnxiIygPNpDEh6vI0+hOIxm3Ul//f9Be+g5CGq8prL1y94wPv6WT9XzIWmhy5V9tmQWgdk= Received: from BL0PR11MB3380.namprd11.prod.outlook.com (2603:10b6:208:69::12) by BL0PR11MB3217.namprd11.prod.outlook.com (2603:10b6:208:63::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.19; Tue, 31 Mar 2020 07:05:29 +0000 Received: from BL0PR11MB3380.namprd11.prod.outlook.com ([fe80::5cf1:5984:e107:f747]) by BL0PR11MB3380.namprd11.prod.outlook.com ([fe80::5cf1:5984:e107:f747%5]) with mapi id 15.20.2856.019; Tue, 31 Mar 2020 07:05:29 +0000 From: "Su, Simei" To: "Cao, Yahui" , "Ye, Xiaolong" , "Zhang, Qi Z" CC: "dev@dpdk.org" , "Wu, Jingjing" Thread-Topic: [PATCH 5/5] net/iavf: add support for FDIR mark action Thread-Index: AQHV/OhI/morBldw0EaxoF4XDnX+0qhiPmIAgAAca7A= Date: Tue, 31 Mar 2020 07:05:29 +0000 Message-ID: References: <1584510121-377747-1-git-send-email-simei.su@intel.com> <1584510121-377747-6-git-send-email-simei.su@intel.com> <31a3b9a8e92642d1998cd1dac2cb2247@intel.com> In-Reply-To: <31a3b9a8e92642d1998cd1dac2cb2247@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: spf=none (sender IP is ) smtp.mailfrom=simei.su@intel.com; x-originating-ip: [192.102.204.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bec0dd47-cd40-484b-2066-08d7d541e593 x-ms-traffictypediagnostic: BL0PR11MB3217: 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:6790; x-forefront-prvs: 0359162B6D x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3380.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(376002)(366004)(346002)(396003)(136003)(39860400002)(316002)(2906002)(53546011)(9686003)(6636002)(110136005)(66946007)(66446008)(54906003)(76116006)(6506007)(478600001)(7696005)(66556008)(64756008)(4326008)(5660300002)(52536014)(66476007)(81166006)(8936002)(26005)(81156014)(55016002)(71200400001)(107886003)(8676002)(186003)(33656002)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YwW6doR28+iVr2lnkpxK0TeSmLMCroZ2k2Ib/gT8tTSshMRmWfYIZ6GZeoyPg3snZHh9i9IKSY/yS0/7IUibx6ICuo25HSeMO/jlwuJ61nxoUBVoGo/DcLs9mvegNM11SJF173oPD3ehLS6v+DSrUX+5PtgAPmKcm3XRu42tdvqqxsjG8bbNX9A7U/sLnUkceTpgkW7YdA7qG/rsMdmBlIg4yBcRNnagK1QH+I/M4kq5NLPkIfyy9AqBwhv2cgxkFdx01RYLf1uxVGTAQVQFUy9ZPtWbG/DdkDZ4n5yUclkNxCNNnSaiHxC69q5KBEFrcIctYsdxKo2ndQOU7KrWB0LN8kC+MZ8SjCvD0OUY66fpiVVbepv6Kvb8tMhoiKUmrLrkUOvxl72hdRzLWjLfRYg0sVeGcmkT7IIb6v0MCFcJ22/NJFwpu7JVC9c1tx/c x-ms-exchange-antispam-messagedata: iptut2VSZSu2miFT4Ux0lVGWhCKRs+RIVmKr2NxRrsJ/2RHcoEEhXdNhTea2+x7JxtSDuzJ1Bkucf38aJnCYEDuzXiWWzCp80Dt8GZBYWXF1Ilj8V8OKZTTVlASez3gxgeAX8s1w9KOzPIP6F9OsFg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: bec0dd47-cd40-484b-2066-08d7d541e593 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Mar 2020 07:05:29.3891 (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: PebwY9LrR+m4VD13dU3R0mpXVY/iSQkcY6HnOkfw/UNHPLnVCDQPLha8VNtMYK8DIweoAaAqM8FguhmG1QYcHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3217 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 5/5] net/iavf: add support for FDIR mark action 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, Yahui > -----Original Message----- > From: Cao, Yahui > Sent: Tuesday, March 31, 2020 1:21 PM > To: Su, Simei ; Ye, Xiaolong ; > Zhang, Qi Z > Cc: dev@dpdk.org; Wu, Jingjing > Subject: RE: [PATCH 5/5] net/iavf: add support for FDIR mark action >=20 >=20 >=20 > > -----Original Message----- > > From: Su, Simei > > Sent: Wednesday, March 18, 2020 1:42 PM > > To: Ye, Xiaolong ; Zhang, Qi Z > > > > Cc: dev@dpdk.org; Cao, Yahui ; Wu, Jingjing > > ; Su, Simei > > Subject: [PATCH 5/5] net/iavf: add support for FDIR mark action > > > > This patch enables mark action support and takes mark only case into > > consideration. > > > > Signed-off-by: Simei Su > > --- > > drivers/net/iavf/iavf.h | 1 + > > drivers/net/iavf/iavf_fdir.c | 46 > > +++++++++++++++++++++++++++++++++++++++++++- > > 2 files changed, 46 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h index > > 62a3eb8..178d481 100644 > > --- a/drivers/net/iavf/iavf.h > > +++ b/drivers/net/iavf/iavf.h > > @@ -103,6 +103,7 @@ struct iavf_fdir_conf { struct virtchnl_fdir_fltr > > input; uint64_t input_set; uint32_t flow_id; > > +uint32_t mark_flag; > > }; > > > > struct iavf_fdir_info { > > diff --git a/drivers/net/iavf/iavf_fdir.c > > b/drivers/net/iavf/iavf_fdir.c index > > 8d49c28..a03bc09 100644 > > --- a/drivers/net/iavf/iavf_fdir.c > > +++ b/drivers/net/iavf/iavf_fdir.c > > @@ -18,6 +18,7 @@ > > #include "iavf.h" > > #include "iavf_generic_flow.h" > > #include "virtchnl.h" > > +#include "iavf_rxtx.h" > > > > #define IAVF_FDIR_MAX_QREGION_SIZE 128 > > > > @@ -171,6 +172,9 @@ > > goto free_entry; > > } > > > > +if (filter->mark_flag =3D=3D 1) > > +iavf_fdir_rx_proc_enable(ad, 1); > > + > > rte_memcpy(rule, filter, sizeof(*rule)); flow->rule =3D rule; > > > > @@ -199,6 +203,9 @@ > > return -rte_errno; > > } > > > > +if (filter->mark_flag =3D=3D 1) > > +iavf_fdir_rx_proc_enable(ad, 0); > > + > > flow->rule =3D NULL; > > rte_free(filter); > > > > @@ -297,7 +304,9 @@ > > struct iavf_fdir_conf *filter) > > { > > const struct rte_flow_action_queue *act_q; > > +const struct rte_flow_action_mark *mark_spec =3D NULL; > > uint32_t dest_num =3D 0; > > +uint32_t mark_num =3D 0; > > int ret; > > > > int number =3D 0; > > @@ -367,6 +376,20 @@ > > filter->input.rule_cfg.action_set.count =3D ++number; break; > > > > +case RTE_FLOW_ACTION_TYPE_MARK: > > +mark_num++; > > + > > +filter->mark_flag =3D 1; > > +mark_spec =3D actions->conf; > > +filter_action =3D &filter->input.rule_cfg. > > +action_set.actions[number]; > > + > > +filter_action->type =3D VIRTCHNL_FDIR_ACT_MARK; filter_action->mark_id > > +=3D mark_spec->id; > > + > > +filter->input.rule_cfg.action_set.count =3D ++number; > > +break; > > + > > default: > > rte_flow_error_set(error, EINVAL, > > RTE_FLOW_ERROR_TYPE_ACTION, > > actions, @@ -375,13 +398,34 @@ > > } > > } > > > > -if (dest_num =3D=3D 0 || dest_num >=3D 2) { > > +if (dest_num >=3D 2) { > > rte_flow_error_set(error, EINVAL, > > RTE_FLOW_ERROR_TYPE_ACTION, actions, > > "Unsupported action combination"); > > return -rte_errno; > > } > > > > +if (mark_num >=3D 2) { > > +rte_flow_error_set(error, EINVAL, > > +RTE_FLOW_ERROR_TYPE_ACTION, actions, > > +"Too many mark actions"); > > +return -rte_errno; > > +} > > + > > +if (dest_num + mark_num =3D=3D 0) { > > +rte_flow_error_set(error, EINVAL, > > +RTE_FLOW_ERROR_TYPE_ACTION, actions, > > +"Emtpy action"); > > +return -rte_errno; > > +} > > + > > +/* Mark only is equal to mark + passthru. */ if (dest_num =3D=3D 0) { > > +filter_action =3D &filter->input.rule_cfg. > > +action_set.actions[number]; > > +filter_action->type =3D VIRTCHNL_FDIR_ACT_PASSTHRU; > [Cao, Yahui] > Miss "filter->input.rule_cfg.action_set.count =3D ++number;" here Yes, I have found this issue and already added in my following patch, will= be included in the next version. Thanks! Br Simei >=20 > > +} > > + > > return 0; > > } > > > > -- > > 1.8.3.1 >=20