From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0056.outbound.protection.outlook.com [104.47.36.56]) by dpdk.org (Postfix) with ESMTP id 1B1F6AABF; Thu, 10 May 2018 11:05:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=RD40DFFzwZEBqwnvxXyOcL465jvSd/CIIWQ7ws0kknE=; b=a8GscIyyDxL6W94JmA7Nxg7ojmJclPy9dv3NchsAEtWB8ww1emoHAl2U5jZEgJ6ELCJ8FldADSAzhKkpnLPvBcaDwaI31HDgb2oOrVGUbNAakvKfZuALzrIuHyjgiMyyVxrGE80US9uN1hiXydVDSJhS+mxx31iInK8T214u6Og= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from localhost.localdomain (115.113.156.3) by CY1PR07MB2523.namprd07.prod.outlook.com (2a01:111:e400:c636::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Thu, 10 May 2018 09:05:16 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas@monjalon.net, andy@warmcat.com, Jerin Jacob , bruce.richardson@intel.com, stable@dpdk.org Date: Thu, 10 May 2018 14:34:31 +0530 Message-Id: <20180510090431.15305-1-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: BMXPR01CA0034.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::20) To CY1PR07MB2523.namprd07.prod.outlook.com (2a01:111:e400:c636::14) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:CY1PR07MB2523; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 3:Cbb4lq6UbmPrs5ul2dNyuRUvpcwfauHzQlJfzc7wmJPdA7Gim4lzO1Ji4mSBGOOJ5+pOH+i2JOZCmt9UHQmzAWZ68YwmA/qAOYn5GvQ3w4NQXBxKg2Cu2dZa6AWrUdUVm0DWXbcHAUg9EmpFJtnrUVAK4sMj3N3FoBgeG0KAXQLuJv91xI9WUGscwRAPdyUkSOPQVpA+ZShntxXKL9odfUvr/L9dxbE2Hp8LUUd7QHVbViR3y6PiN+aaX+cSFouS; 25:hz8gwFFEDYtleFlfDHG1Zk8r0yyNzQFbqxMLzeyWcRnZ2/uidheKutGAk27Ue2EXzJXsRfVSh2+q+sTdWIxIKFEeDb6sDHi5FmKWNxZjKKI8qJg8fy7KJi8eSzLuE9+7hzI5rSBAUoAGGkcTeKPESedMHnIPcGeTJ4iTK3xRvcABLbGzKUDkJP2fk0eX4OUrEe+gw/Ky67OPX+T19HsWqO1/BM+sGDNt4ZN9NjOJoOGCDfoSfRM8A3v6uGzEWDT5NOLCHLnoV/bDxkAuSIcguAw3J00eqHOZ4mg9dN3h9+Q4L1VOyQ6WJyv8RqzpT+kkDzU1sjCPkQUKuY0+iwCWTw==; 31:CeMEHIq+ePmnIDLIkylGh8qijvzO9inzcTRYvwL8c7LTll/w/bM7YX3bGYqPj+YaBvl6XDTABIACMq9ZCsuy4rhHO64Okr3vCAWjFP1nRM4knOephOghLK3mGy1xSHzt/D9rpBBhk2U255iaasixHi8ylNKyAm/h8g0gYek8/2qLhEMP4u4+L6ghg4GmM3gpt1USJBIVqKhRnTqaVlFiAEyv0eCeSJJUA6nIvb/rKYc= X-MS-TrafficTypeDiagnostic: CY1PR07MB2523: X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 20:fCjdmUQ427jKGACex0OPVUx8QLwaGb4LLRAQBT++/gIdzWW/v8HL6JW/yo66NtttHFpHZcf7ac7tVTcJdUoRjj/tjemZ/dOAbY0DNpH26U1p5kvDm9DqydR4csAYJoGSU4MGZXIBbfrQDFyTKamFesDAZLucFrYvlFg/GPNa1CT9CC17w6fEbsXYdZzjocx16NjWC2WzWO0HQxQ+kU0Lb8XgUk4PqM2wdZv7bxsXqGdKMT9+h4sqsP1c4OLoLTtdEh8RqngQUqIfzp+gvnJrJs+HfZpJi47P+SHnGvoPrDcVFXkNKYtUtIwtf5wQPnoTuDDLPNopuKlpHcNTzPRM4B4/BEueeKP0+jp8XC4Rt3hpkmu7ifbB6Mthmmqv9BbcixZ2Q98VtSLHeUxIKzYiSGxRkneFYDPcve9R41E/sNpKqSQv/YS66Y6A7z0VgmRYGMtl0bqf7d4w72Swz/M/hUKTK6SpFD78YpVfxmTXtdNUPJtIq2cnhAACg097+5VqBj2FEtwqqPO1MI204BXqhaae+9ZAp+Ll9VChsV5gLYzXN3JbidjakO/PP3Zr1ibx6Mu8iC623M3ByTRF7wJr8GkXI2IOOTkGhBtgIpiCqF4=; 4:tvz+xPrvfv/518mJ0UAc+fambhLZZOrJlJypV0zKp+SD6n6LTUa6yeuao6EwI5i1fSGGOt4p8SxQ42H/EAcv8h3fiu+HfiXltU8TyLFIPej//YGWMhDPJvMax/nmL6J6mMaUcF0JOFIp6r6aaUYatamZUMJ8vJU1QYiy2cr0jFqk4L5/rJYA2sba/OXfjSSDq0J5FQCzBl2WM9h8roxkiL7d8ODn5zRVu5E2xdj8+1ckE12vpABVf0IexgirXQ7n7cBUCh2SoqoHkRC1cgcM+y4kuud3wHOddBbXt4C+BHqnKUEynNWaebOqAtc+QVtS X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:CY1PR07MB2523; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2523; X-Forefront-PRVS: 066898046A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(6069001)(39380400002)(39860400002)(376002)(366004)(396003)(346002)(199004)(189003)(68736007)(50466002)(7736002)(59450400001)(106356001)(47776003)(66066001)(26005)(72206003)(5660300001)(186003)(2870700001)(15650500001)(50226002)(6486002)(316002)(478600001)(36756003)(476003)(1076002)(44832011)(8936002)(6916009)(956004)(4326008)(23676004)(2351001)(2616005)(105586002)(1857600001)(52116002)(8676002)(2906002)(25786009)(6512007)(81166006)(3846002)(386003)(305945005)(6506007)(6116002)(81156014)(6666003)(2361001)(16526019)(42882007)(53936002)(486006)(97736004)(55236004)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2523; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjA3TUIyNTIzOzIzOmd5T2lrbmRJR0xBbEd3OExKVDdIU0U2SUVO?= =?utf-8?B?Tm5GNzgwS21SOC9IWU5ON0NOb0V6b09pMnNZY0J1Z0VJMHBjNHVIVkdBYVBw?= =?utf-8?B?YjNQSHl2WFdTTzc2SFA1K0J6emhoWmc3VEFubW5pa3RWWVpJOHdLZHp1MDZ4?= =?utf-8?B?MVdFY1RkZk5vaytlaUVlQ2FEVnI2SjRIY1RMRm0ydGtFR09nYzJPcnNtWVF3?= =?utf-8?B?WS9zc1lYbGFPdmZ3eFZ6ZWhJMG1mVzZMMWtNTjFSRWU4bG11eDV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1waVIhKDkeFoUlqoLW387B0dhis0FjOsLzQK1HszC4SLWvnz/6/xnSW/WD4os/+RLncL4QX6nd58gc5imSmel5 X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 6:XMrUn5uRRFaMuQHYTt6EHC6q4uIlCLKL7oMCsTeYGsVGxr3MAE7B3YPJxU0lmR0xOIC9cRHgvdjF1oqm6J3+kLndAXikzJIhhQOXbJjn2pNWyxgwQ9maapF5U/QtGiz9tkDp/3IkLqQmMGKfNtk1mMysvC4J4jiCslF8c6dNj8p5QJDamqdzAz1O/luhNRfljR4S3xyxGSS4jBH9g0X1njrlxYOwuzZ+DWqkNFpx9CTa4u3mAw8Mozp6HgRcl1r4v/yujhmU4wRlcjJ4Lr/FgmF7JRqijEm1uZdhorUbhfblUqs2yk2wouYoMzDZxJmp+3BBNKPTfJQ7rJ6JSePy2tJs7JjU+0hSxxl/tpFOqWyj1CCH8079W4MCj9SCDk7/fiuXeIE6qdP35Zq9cnwFrawYjLmokMQmh0NrGubLO7VJjNC46nblD0EqHuow0hxdZn98fLFPym8G0wUso2YPaQ==; 5:goWUnrjd1cOH0UxY4QksMlBL6It7z8tgioMOUz79FG03zYuvoza2gAxEYCgPf/4Vvlry71KTCTUGtTMX/MSP3shN9tJJkS6q7csIfWtqQtDL9gKFcQ1BuE4aRr2uqX4kok/BBJ3rKrtuMJL27I7s66q4QOsDJBxLkTOohorSva0=; 24:/s1QjdbuheLfQEkMzxKxj41FUnmjUMaY6RwhcqUBt9v/obU1jbG0/iYi9CZUPt6cB+87FY26RW6xwDl01E5kxjQIYK0X+89twTogHu586yM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 7:S+bhp4CMdlCQdQZ0uCzIzarApCRvbi1xwH+YaBst423vDDAD62ciVwkAL/sLMu0QJT7UqEm/sv2ZBjG8DtzdCzbzjUDqXbLVrikwH16JqeaIXv7udiipxmODC/RI6+lXc1dcuVzJ6WNO0QHXQsJj+Nb9QCtiZe5EvYANgUEpapyNYdv0vjJqRzilITL9IhmMVGHX90ww0Tb9kkW2Cz3OADwLx4gcsEqJV5nvDDFaGhfdnWCoNtoziiTR7+yA93AN X-MS-Office365-Filtering-Correlation-Id: 3c88449b-1f4a-4685-513d-08d5b65527a2 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2018 09:05:16.3563 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3c88449b-1f4a-4685-513d-08d5b65527a2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2523 Subject: [dpdk-dev] [PATCH] examples/quota_watermark: fix wrong function type casing 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: , X-List-Received-Date: Thu, 10 May 2018 09:05:22 -0000 make pipeline_stage() and send_stage() as lcore_function_t. Found this issue with gcc 8.1. examples/quota_watermark/qw/main.c: In function ‘main’: examples/quota_watermark/qw/main.c:350:26: error: cast between incompatible function types from ‘void (*)(void *)’ to ‘int (*)(void *)’ [-Werror=cast-function-type] rte_eal_remote_launch((int (*)(void *))pipeline_stage, ^ examples/quota_watermark/qw/main.c:357:24: error: cast between incompatible function types from ‘void (*)(void *)’ to ‘int (*)(void *)’ [-Werror=cast-function-type] rte_eal_remote_launch((int (*)(void *))send_stage, NULL, last_lcore_id); Cc: bruce.richardson@intel.com Cc: stable@dpdk.org Fixes: 1d6c3ee3321a ("examples/quota_watermark: initial import") Signed-off-by: Jerin Jacob --- examples/quota_watermark/qw/main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/quota_watermark/qw/main.c b/examples/quota_watermark/qw/main.c index 313216f39..f3830557c 100644 --- a/examples/quota_watermark/qw/main.c +++ b/examples/quota_watermark/qw/main.c @@ -181,7 +181,7 @@ receive_stage(__attribute__((unused)) void *args) } } -static void +static int pipeline_stage(__attribute__((unused)) void *args) { int i, ret; @@ -243,9 +243,11 @@ pipeline_stage(__attribute__((unused)) void *args) } } } + + return 0; } -static void +static int send_stage(__attribute__((unused)) void *args) { uint16_t nb_dq_pkts; @@ -287,6 +289,8 @@ send_stage(__attribute__((unused)) void *args) /* TODO: Check if nb_dq_pkts == nb_tx_pkts? */ } } + + return 0; } int @@ -346,15 +350,11 @@ main(int argc, char **argv) if (is_bit_set(port_id, portmask)) init_ring(lcore_id, port_id); - /* typecast is a workaround for GCC 4.3 bug */ - rte_eal_remote_launch((int (*)(void *))pipeline_stage, - NULL, lcore_id); + rte_eal_remote_launch(pipeline_stage, NULL, lcore_id); } } - /* Start send_stage() on the last slave core */ - /* typecast is a workaround for GCC 4.3 bug */ - rte_eal_remote_launch((int (*)(void *))send_stage, NULL, last_lcore_id); + rte_eal_remote_launch(send_stage, NULL, last_lcore_id); /* Start receive_stage() on the master core */ receive_stage(NULL); -- 2.17.0