From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 86056A0552; Thu, 20 Oct 2022 13:12:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79DE342D19; Thu, 20 Oct 2022 13:12:26 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2080.outbound.protection.outlook.com [40.107.94.80]) by mails.dpdk.org (Postfix) with ESMTP id 74CF642C7C for ; Thu, 20 Oct 2022 13:12:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B0NJsb+mfNoQ+Otla5dqBtvtfkfRtEdwRFhAtEMyh1owFWVXh7wLdctUOGuJxHfeBEv/x0Keoq81VmOIS3HGe6ik5mKNLf+znrFKUa0laP7C7m1t2pRGjiloy+dlVpBWwjv0smjVKjIxwoypZ6Ifn3N9HQppkMYrmlKHaid2QZt4Ov8B4E6n+LumMwzPF9TotbVAEhDXKDNpifdKVawniBACV7QpbiAdAwECzTbzRHVzmM+DRZ0oxG62DCKrpWQZqA6ov/BIpsE7IyJD9+Cowes2fHSOrm4PNRhOWw9vty7nKgdpzvPAayGjOTg9XGB6Li21ZvYGMMAPTv5gLtbWDA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pZyxWgl9U09maEtlNgmWzLkNb1yxItgw9H+ElBLjPfQ=; b=jMuTXheFcPoSSu+KeS0FuyHJOScS72xX6Srb5dh2DT9G5rmlnh+7H+49N0lrcpP6eJYHuOOAAybTW0V4HLKs/5dUFXxfi3VhmsNHbohGpbF/aZAFlLeqKTgWYlVLdNA87WuBPYTwkMBkrC7XuZAE1uHBm2KK9RlDNRQ2hU0aXUlNO8C3H5STowtJbsghyUU94/WJ9LLI+wFRCbc+6wWSprmbqbRRZ8FZ2qA9JKH2W9Pi+mBqfjPO1A6FgG6GY4Fonsah1HX2LQuHOykw2n31RCC85dz9ASl1IL/lgKtS2oNWsXRmAe7N+J5MWLkIlQz4cMVPg8WfJDJoLyH4xGcoTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pZyxWgl9U09maEtlNgmWzLkNb1yxItgw9H+ElBLjPfQ=; b=KV2s8wI8PZtYkKRcgyZIL0vkX3zVUx7wxGIO1zfrK5Zyyjn10UaYO1fNgIZ7+TZffA4cUhmldUGaMS7u/qHfOHRNLSL+pYKXv3PZ9VoFmMNsnX3gJRoHul561OZaLww+89LOOa7PIy2eDoxJM9AZ2ytnPTez6Up2m3hGes0POWw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) by CH2PR12MB4040.namprd12.prod.outlook.com (2603:10b6:610:ac::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.35; Thu, 20 Oct 2022 11:12:21 +0000 Received: from DM6PR12MB4297.namprd12.prod.outlook.com ([fe80::b9fd:e732:4585:6b25]) by DM6PR12MB4297.namprd12.prod.outlook.com ([fe80::b9fd:e732:4585:6b25%7]) with mapi id 15.20.5723.033; Thu, 20 Oct 2022 11:12:21 +0000 Message-ID: Date: Thu, 20 Oct 2022 12:12:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH v5 06/25] net/nfp: support basic flow actions Content-Language: en-US To: Chaoyong He Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, dev@dpdk.org References: <1666092434-10357-1-git-send-email-chaoyong.he@corigine.com> <1666232391-29152-1-git-send-email-chaoyong.he@corigine.com> <1666232391-29152-7-git-send-email-chaoyong.he@corigine.com> From: Ferruh Yigit In-Reply-To: <1666232391-29152-7-git-send-email-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO2P265CA0092.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::32) To DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB4297:EE_|CH2PR12MB4040:EE_ X-MS-Office365-Filtering-Correlation-Id: 210c782b-66ef-4885-8077-08dab28bf584 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nPXiWTyIIlCzCupcm2eSDaAjqZFi91/OlSvNaQt7cLc9O0V8C1GGWC1T/eWtrKCeFxRH8XJ5cl97lMWculGVEZQoDvPqR7w5N3d2vTFpQNTOeSoOznZbxCebtMkHYj+5Gs7Tm3PnJFB4ZmU5ZjhcSS6WOB8WiszDDoWNY3np1pmHqT1eYobcrtzCQLHu/ADlBAy6VSUTCxdV2sMn4eekpcrs4wfyDYzNCyj265BXL0fsl/hmm8pSyAfYz8uY8lDsGnGQcwNYjZ0VpKL4G57vVzhRTX6jQYO2Ux4B0NbrAEfggE2MuW7vLYlISCBvQ7ITAn0Rt84k9gPmYA99a+BZ8BhBlBmS13ynWdqVyO9/ZRpT+45/y/bvP239buWorkhThbBr9nIbMxZ7gscmCZTK7l/WAf3EDywPWQwOo6VczpWf3U/Qcp8VgXCeYX+XWYxhC0QwVXBhvumFnJnF7D3YKQl3B0j9r5MBUV53yDMXOnybD1Q82tItq3maVCngJa3PouLMj9tDu+gfSEQXmmNvAUWBWaNKUO6ZR11Jq2zf5z2VqjHTIn43JKJ6yapR8nWkx/1DQ1rCaU4UnopF+kWraUJg20R2iErbVMPKCrE9YXR19BuEs2dOvaRnwyyweQl8Te5n1++xoR0xm3yEu9IC49D+m6tOJ9J3pWCDtmGHCW7txoFMwU1mge1qeZqnbB6+BbuAMN8nBlEQbJdBuUfCvYL9Zhte/IbDFFlIcCL+6CfRUELtdi8DfzV4bVB9oGbEwFMBZ0riK8+GRHHxsOJo7Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB4297.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(39860400002)(396003)(346002)(376002)(366004)(451199015)(31686004)(2906002)(31696002)(41300700001)(66556008)(8936002)(86362001)(5660300002)(66476007)(44832011)(53546011)(6506007)(8676002)(6512007)(4326008)(26005)(316002)(66946007)(6916009)(6666004)(38100700002)(36756003)(478600001)(6486002)(2616005)(186003)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dGRhU0pEd0IxeDNtNEhyQmx5a3R1RHc4ejYrSTQ0UTlHeFVxSVVEbDltTkpw?= =?utf-8?B?bHo2a250K242bnE0TFlhMSttS1BrSlRPYWtpRWFnL2tJdjFqWDUrbUdnZEN5?= =?utf-8?B?UzdGbnh0WFhTZEZCQlFNY2I0YUE3QUlsYndrYTllMmNIeGRIWnlYbEoxVnJv?= =?utf-8?B?S01LdWI3dm5YWUg0a2VjdThMdzFsRmE3MGZ4bGZqK1ZrZVg1U0dQOEZBeVBV?= =?utf-8?B?T1d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0RHWUp6NFFBeENBbjl1MFJI?= =?utf-8?B?OE8rOFR1aXpHdXppR1pPKzRFbHRzZGRBS2FndmNEdkp4d3ptWWJWYUY3VWdG?= =?utf-8?Q?nZVykARfjxhApHDtjQiCB88Ey?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 210c782b-66ef-4885-8077-08dab28bf584 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4297.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 11:12:21.7521 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RuHBtkK+3+z+Jf8yybnYPp2ta7lN2RPgGjvz202wSuMhVBSOk3iDRq2nIJNcNBev X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4040 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 10/20/2022 3:19 AM, Chaoyong He wrote: > Add the offload support of very basic actions: mark, rss, > count, drop and output. > > Signed-off-by: Chaoyong He > Reviewed-by: Niklas Söderlund <...> > +static int > +nfp_flow_compile_action(__rte_unused struct nfp_flower_representor *representor, > + const struct rte_flow_action actions[], > + struct rte_flow *nfp_flow) > +{ > + int ret = 0; > + char *position; > + char *action_data; > + bool drop_flag = false; > + uint32_t total_actions = 0; > + const struct rte_flow_action *action; > + struct nfp_fl_rule_metadata *nfp_flow_meta; > + > + nfp_flow_meta = nfp_flow->payload.meta; > + action_data = nfp_flow->payload.action_data; > + position = action_data; > + > + for (action = actions; action->type != RTE_FLOW_ACTION_TYPE_END; ++action) { > + switch (action->type) { > + case RTE_FLOW_ACTION_TYPE_VOID: > + break; > + case RTE_FLOW_ACTION_TYPE_MARK: > + PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_MARK"); > + break; > + case RTE_FLOW_ACTION_TYPE_DROP: > + PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_DROP"); > + drop_flag = true; > + break; > + case RTE_FLOW_ACTION_TYPE_COUNT: > + PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_COUNT"); > + break; > + case RTE_FLOW_ACTION_TYPE_RSS: > + PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_RSS"); > + break; Above MARK and RSS actions not doing anything but not returning error as if it is supported. Not sure about COUNT, since driver is keeping stats may be it is supported by default, but if not it also needs to return error.