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 C0581A059B; Fri, 10 Apr 2020 10:24:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 984BE1D168; Fri, 10 Apr 2020 10:24:05 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id E9D7A2BD8 for ; Fri, 10 Apr 2020 10:24:03 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03A8B2ox028978; Fri, 10 Apr 2020 01:24:03 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pfpt0818; bh=3M6f3yAigSAR36pmGW/lRVUyGTlxH9sP/+/m383/Ne4=; b=tAWrcewRj0GDZJx9Jw/8V0rTRNPKyMhx0p7xVgwyDomuIBgfmFAN+1bBJwgUET+aElXK ErANQtRCrnZJ29qfb6sqi4cUXK/UoXuPm4YhHxUZ6rneJ1MoyQr9fbeY6TkhbhRFEFsm b91bloA9srARrE7avNEQsGnLLXDgd9eJ6QjWdI8z4pYcsQ0fv3KjCjDSuLZBf0kkp8Sb qQjy8SVhk8ojTOTQMiJvjvqTFXvSgg5jSGiy4dlMmiM2+/DzNdz2zlPhnN+vsDc/ANvn 6SzeYaTC0kwN7idIyzoqwSrxAemBFI+OOvmomTGrDJ9bktkOQEc1WxpiFaN8jkm3+Hp9 aQ== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3091mecbmh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 10 Apr 2020 01:24:03 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 10 Apr 2020 01:24:01 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.51) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Fri, 10 Apr 2020 01:24:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oM8kGctN9U8UN3Di+LM05ZJwlwpInYDuUfwxSRSjqiXQsyFJI1UYjNOUwPIEkdZQ+YWtHPwlu94zaN/37iTx/fvGBnmq53UeZh9nhfqxeWVWMvezOvhqUg8HCWvpiFHiDBLhmF2Xb0ZZX8wFF0oJtWmPhHc56YvnaDFJlVBp7LQ4upN8tvz2yZr827tFOuYBpYBOLzTMFjeEX2cNkgxjnhDyAMRHpPWHVkINqwKquHjr4edw9O5U9azQeDW0I2xTkwoE9NkvHKoniEt0p//RRwDvTjLLt1dAHhlQmVHdEObher+XV2UQYOW9LcX5mohb1ejSZ5u7hvb0iRmqdhdUpg== 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=3M6f3yAigSAR36pmGW/lRVUyGTlxH9sP/+/m383/Ne4=; b=f3i3fDvKwkzQw5gM1PaBs34HE8l/bOdn+KspVFKzsirZtp47yretzOgh74ANSOpgFtU21D6+ToqaO7nOqI0AMtdpUX5qDSqVR0gElt5s2NLp0u67pbECrJL1Q7GLukMPze4Xteg5I8S35fx81oGg0T2AbdaqFdkA70NsEUFXC3drP6cLb7NoUhaarVB6rwEcpNziqY6zAX+L6iPtodP9tA0+FLrd6X3rsQZ3uVIoyJXsRPKS3EgD44R1WrYrcT+L+4Zbuy4TqP5tiiwGdS9H0fxVjsm5WXYoBJrKeDoSjMvNn0XsbCdp6m9e+SoxEZKTJOD/ddPzaZb13/tRxikLRg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3M6f3yAigSAR36pmGW/lRVUyGTlxH9sP/+/m383/Ne4=; b=laPw03V0q+b+U4DU65Ah3Tq33IRyOKLpvmS2nFlomqwo/cGguKBvGjf504vrqYhDmB2ZyzBsc4kxGXjbu+aHTUhCAj8OfAs4YbGKweue/7Twn0gVZJak2OgMqUi4hZRbdUrImPLUBm4MDYA77H+IA4lhKnfv1nr+Gnah9/4k1zU= Received: from MWHPR1801MB2063.namprd18.prod.outlook.com (2603:10b6:301:6a::11) by MWHPR1801MB1856.namprd18.prod.outlook.com (2603:10b6:301:6b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.21; Fri, 10 Apr 2020 08:23:59 +0000 Received: from MWHPR1801MB2063.namprd18.prod.outlook.com ([fe80::380f:5ca1:ce60:6586]) by MWHPR1801MB2063.namprd18.prod.outlook.com ([fe80::380f:5ca1:ce60:6586%7]) with mapi id 15.20.2856.027; Fri, 10 Apr 2020 08:23:59 +0000 Date: Fri, 10 Apr 2020 13:53:49 +0530 From: Nithin Dabilpuram To: Andrzej Ostruszka CC: Message-ID: <20200410082349.GD23867@outlook.office365.com> References: <20200331192945.2466880-1-jerinj@marvell.com> <20200405085613.1336841-1-jerinj@marvell.com> <20200405085613.1336841-26-jerinj@marvell.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (34cd43c) (2019-09-21) X-ClientProxiedBy: PN1PR0101CA0059.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::21) To MWHPR1801MB2063.namprd18.prod.outlook.com (2603:10b6:301:6a::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from outlook.office365.com (115.113.156.2) by PN1PR0101CA0059.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 08:23:57 +0000 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d8ea128d-20eb-4369-dcf5-08d7dd288483 X-MS-TrafficTypeDiagnostic: MWHPR1801MB1856: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:415; X-Forefront-PRVS: 0369E8196C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1801MB2063.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(376002)(39860400002)(346002)(366004)(136003)(396003)(16526019)(66556008)(6666004)(2906002)(6916009)(186003)(26005)(6506007)(86362001)(316002)(66476007)(66946007)(55236004)(53546011)(8676002)(956004)(478600001)(52116002)(81156014)(1076003)(9686003)(8936002)(33656002)(5660300002)(7696005)(55016002)(4326008)(42413003)(32563001); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n0Whec36ldL4DIUeFBv0Z3IPkjT+PpJIaC+H7+eg7UzHWBgD4scRHt5qg0z5AdfNnClgS1M03dhmk7Z7QIM7N9TXEHZkzZWiwIClGP+QYvVSMkay/cMCLO0wg6WD6r19sDyksVsrxmdhiKR6Pwm6wq9aq7oN59nERYcW9EqtPO0mDc0paYtIGm4dabe3ZtKQJT1ZNbVnKSgYlRwycpAxlfVXbB5JQAIyujxKr+ZZD6bMVzSmgQhHhpcZddCh77IKhY7whfs7FfLvAuq7NI626BkKJQ/gulPeQsjjfhLkCw5MXsuoQz0LXcshSB1n7wSICTJWNvjOB71R6dKHjl8JM+pOwWmePY0SvqJjEZrjo7qyZ8CHwUa5OCag8aqhE+BiKHhSYYyNgpIDkcCD0JOsEQpW4VXpT8EHl9QStALmJcEG3jfUZQ7Tk95VkeYEZIgyImyo9ELT3O4Mt4PXdOEFe6lT1hapMTrrH9spzoVo+CCRzmg9mVAFWIAj1Q+zCJpa77oW9PVbNZ0hUyduhxnx7Q== X-MS-Exchange-AntiSpam-MessageData: Z5ZKBXXgeKub5sA8HqrjLj/0x1UNeX6+Ppi68OGO9eBAnlaDSax6SD4FIoqa8sqCY+pTknaH84RsYZXNSotWpKTvxh+oEs7EzQ5tEPb7zM8yDvR4/isb/Xx1c1o18GW5WB8hIjRFCjgbTt1jVlpUlQ== X-MS-Exchange-CrossTenant-Network-Message-Id: d8ea128d-20eb-4369-dcf5-08d7dd288483 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 08:23:58.9868 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6WAFEFCu8fdEbG+orNvKOjaUSnhnYuDnF67VF5AKQC0IYzOCmkQzokWt8vW7sUuWdfd4TvkrU5/aiq4IVxEBEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1801MB1856 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-10_02:2020-04-07, 2020-04-10 signatures=0 Subject: Re: [dpdk-dev] [PATCH v4 25/29] l3fwd-graph: add graph based l3fwd skeleton 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" On Fri, Apr 10, 2020 at 01:04:20AM +0200, Andrzej Ostruszka wrote: > On 4/5/20 10:56 AM, jerinj@marvell.com wrote: > > From: Nithin Dabilpuram > > > > Add graph based l3fwd application skeleton with cmdline > > parsing support inline with normal l3fwd. > > > > Signed-off-by: Nithin Dabilpuram > [...] > > +static int > > +parse_config(const char *q_arg) > > +{ > > + enum fieldnames { FLD_PORT = 0, FLD_QUEUE, FLD_LCORE, _NUM_FLD }; > > + unsigned long int_fld[_NUM_FLD]; > > + const char *p, *p0 = q_arg; > > + char *str_fld[_NUM_FLD]; > > + uint32_t size; > > + char s[256]; > > + char *end; > > + int i; > > + > > + nb_lcore_params = 0; > > + > > + while ((p = strchr(p0, '(')) != NULL) { > > + ++p; > > + p0 = strchr(p, ')'); > > + if (p0 == NULL) > > + return -1; > > + > > + size = p0 - p; > > + if (size >= sizeof(s)) > > + return -1; > > + > > + snprintf(s, sizeof(s), "%.*s", size, p); > > Could I ask to make this function to be the same as final versions of > l2fwd and l2fwd-event that were recently under review? There were > couple simple comments there and they apply here also. Ok. I'll sync up fixes from l2fwd-event to this function in v5. > > > + if (rte_strsplit(s, sizeof(s), str_fld, _NUM_FLD, ',') != > > + _NUM_FLD) > > + return -1; > > + for (i = 0; i < _NUM_FLD; i++) { > > + errno = 0; > > + int_fld[i] = strtoul(str_fld[i], &end, 0); > > + if (errno != 0 || end == str_fld[i] || int_fld[i] > 255) > > + return -1; > > + } > > + if (nb_lcore_params >= MAX_LCORE_PARAMS) { > > + printf("Exceeded max number of lcore params: %hu\n", > > + nb_lcore_params); > > + return -1; > > + } > > + lcore_params_array[nb_lcore_params].port_id = > > + (uint8_t)int_fld[FLD_PORT]; > > + lcore_params_array[nb_lcore_params].queue_id = > > + (uint8_t)int_fld[FLD_QUEUE]; > > + lcore_params_array[nb_lcore_params].lcore_id = > > + (uint8_t)int_fld[FLD_LCORE]; > > + ++nb_lcore_params; > > + } > > + lcore_params = lcore_params_array; > > + > > + return 0; > > +} > > With regards > Andrzej Ostruszka