From patchwork Fri Dec 2 08:11:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Forrest Shi X-Patchwork-Id: 86252 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp167676qgi; Fri, 2 Dec 2016 01:21:31 -0800 (PST) X-Received: by 10.55.31.205 with SMTP id n74mr36942313qkh.269.1480670490941; Fri, 02 Dec 2016 01:21:30 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id p16si2482079qtp.282.2016.12.02.01.21.30; Fri, 02 Dec 2016 01:21:30 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 851B562EAD; Fri, 2 Dec 2016 09:21:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 0A3A560ECA; Fri, 2 Dec 2016 09:21:25 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 290A160EDE; Fri, 2 Dec 2016 09:21:22 +0000 (UTC) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0101.outbound.protection.outlook.com [104.47.36.101]) by lists.linaro.org (Postfix) with ESMTPS id 2851E60EA6 for ; Fri, 2 Dec 2016 09:21:21 +0000 (UTC) Received: from DM5PR03CA0015.namprd03.prod.outlook.com (10.175.104.25) by DM5PR03MB2985.namprd03.prod.outlook.com (10.175.106.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.13; Fri, 2 Dec 2016 09:21:19 +0000 Received: from BN1BFFO11FD024.protection.gbl (2a01:111:f400:7c10::1:116) by DM5PR03CA0015.outlook.office365.com (2603:10b6:3:118::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.13 via Frontend Transport; Fri, 2 Dec 2016 09:21:19 +0000 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD024.mail.protection.outlook.com (10.58.144.87) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.734.4 via Frontend Transport; Fri, 2 Dec 2016 09:21:19 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:526; Count:8 Received: from localhost (rock.ap.freescale.net [10.193.20.106]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uB29LGDU007069; Fri, 2 Dec 2016 02:21:17 -0700 From: To: , Date: Fri, 2 Dec 2016 16:11:08 +0800 Message-ID: <1480666268-5516-1-git-send-email-forrest.shi@linaro.org> X-Mailer: git-send-email 1.8.4 X-IncomingHeaderCount: 8 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(5003940100001)(50226002)(305945005)(57986006)(189998001)(7846002)(97736004)(5001770100001)(4326007)(105606002)(47776003)(960300001)(106466001)(5660300001)(2906002)(6666003)(42882006)(48376002)(92566002)(86152002)(36756003)(81166006)(85426001)(50466002)(50986999)(356003)(33646002)(104016004)(39410400001)(68736007)(38730400001)(8676002)(626004)(39450400002)(2876002)(81156014)(77096006)(8936002)(76506005)(41533002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR03MB2985; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD024; 1:BbOLaJ4tKng58Ctr+7/JzZZodNRIfo7p0uL3+dcdnQsA12x7etIGxX/oGhYd2xox6eRUV+iDBhJwNWS9c8uTKgZOMDa7FfbgyhoizJxlC5XKQiHHVew9PuRP8KM1L3HnbUdf7osBrm/sBktocNM5JekjTF1r1fibSViPCByrdgjxQD4Ovnm8LzVrr6vEstrFeMGoFcop9/259gqfegukKF3PVu5wzg5uXoO8jkxDuyrK31VGo0HgXa3EyJVPssjYozPrQsdGUpgG31Lqtx1vJBxW+dfLIuFQDl6MtB1QpDQdnPn76irpYwhDJ/2m8KEprLBD7ABCQ+1ZKH/t+7WhyzZjIcoD+CYftvHGYH6fNKayphk+NjaVrCeNsuinmSbjqgMaJphZHYPYmCijjg/0JgHuBLTXFqe5w16HLu8wz1cDZ/7dpbdwH+AvDLF6QV50WMs61jWzylDkz4d+kva6BShFlSXtiSXdvphdqwhbw1w7A2uqX+fh5JvfVU5CyUtsSImoTNPUlyBksFQL1RDDACC0bT/Fwo9WtIkJ8il0G3VsBtdJzfP2hKPE7g9c3hspRHI3yza6xTmJMVTw0X83zW/3PcRH6VauVn8kD/S0DOt06IbCWs+kW4TKbNtEO6pq MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 8cc979c7-f57b-464e-a716-08d41a949324 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DM5PR03MB2985; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2985; 3:VlmMulwUIAlfhrCmm5J0gVVfecZcm9IftKq/7JHmxkYWNtDL0wWPsj+cnaaw8Tar07i/Bhbk5weUWIMnVj2tp1LPSfSscSxaoqAN7IhE9dXsWH5FlK4CB4lDTdhj23Wz2Ho3GmVf31b6aPwHL46BEmw5TIjsCHplRl97DSUniMuFtwrqs5kl43zTxjjyAnz0vzw/CqFBOgZvyxOIWg8hVW91zaYOEps+sJnFDg9wgpEKWIHu8jktIlTN60CXp5dIWuLAcMe4EWavYqI/aEr6NfWI8ur58R52y+9ra3TqNmqRAdbuXGcqVMBeKUtNXqzvYXPCkrc6n+dZB5tGHSJbSxuCHyn8T1JnsqiIphzY+WK2XZ70tClIKV97miw0dcwA; 25:v41lfGgCPBR4gZ36JQsyitCL9tfrzz3d7U8RrIW0/sJeruT5Gk1j8SI7qyJ3I8VE7WJ8VJTKzOXd63IGIzlyAsplBrdKdCGcnGh2bgpD48fNsiMw7Ldum/HO+rxzRqwcdAV/gvH0bChg83E8QB4ALZma9qV9b3wi/tiZLO979K3dfNXYqDRQ1YrpWzMW1soPqdFVBrwpIlf/sgMzH2e4SUWBhh0V+LREP2aVvL3HI2IM5ETIS9YqLaPwSrS6+TjxL68GRHfmGrbUkzzyr7PDvKVn5z0w7UFnnACh6sH9RK0yR++vljth3yBr56T5JmdBEQrdBKsXPe0B7Pc5DkoEqawcOqHR1dyh821p4rikT5Yc4Ko8cqeC8ivrxeQlpXNgUNM7Ih0DNvkQigdcea3zsaNx0DUeY4VYMAeClU8FUp/sqNVmZzxXE1GjXdf0GwCqcRCKTWhncpWi4LzOd9GKQw== X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2985; 31:U7X91ZFQrWrqWC86YmNafeR/8So3MaBBqb5kjX8uzMUV8QD5o3QgewQfytH0Zao0OviU+BsfNwrf1NW6+WMwb4Q6HTW0UnmKgEw9FdaJD9ZdBwcqJbyqUYeJXeDJfG7TGnjhS+4hSGi9GoAzj+SFpb2QohbPfRhuagwlHHvK+9rTP/+nAxo6vlexwZ68B44zsLQHt8m3bMic+mI4TAbB7SvkwyUsZyEMmEcIdaR02+sQ5wXT0MCLq16f6sD3S9L/JEXWrsUWhBFqtABvr5HuHA==; 20:m/nKCHmJLTGD32gWTtIixqOEm4M4lDv2rEjtKHNCu7ZM7iisJzTJEEa3AICgE0PG0Jozk74XRgUAkt8ltto1Q00hxNVuTIM33usbhra/0KsFyOWi5TZVn7XOfDOWmYrDcxD0Bn2v9w7sOY0XUekawvvBeCQoGpjAeXMZsfmPPlcf7fCzItpNkVafZcTgz4YdZffGtjmfmRkydBDtBNdJkqDwNS/EAER4L6ChwYta+L+v/YcBv0FHzGT+hdp8mWjlk4fvWTENRrxGwvCtXjHlpzZZT33SydMbjZNd5H9uJn/qv+TtE2pwx2Eu1C0gZlQ2CNRpVeK1fIfSzeo/P/O9YbS7AbpVoYsAlrpIgV6V7U68UxrvjurD58WqmqRuk1tT4qLja0CileK++LxSkxyZzL1o5YsB8a4/DnNcTUm+GD/FxfxoRWtC1x6cqyPSFn3iGFLGFfxxB8gJ/JnAPf8zpKos6KjG6Xah23tSVe57RVAOWlqh1STELzyh3ujvGnjMww8e0sQSk+acIvij1OKRBqGBRSIq7+E7ZK3JONZwSPeeN0ZsV9E9ikNnjMPtA/DYxPIdoP2WYovqof36PejazjJSe2N+vvS2begVNi4M9g8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(13018025)(8121501046)(13017025)(13023025)(13015025)(13024025)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(6047074)(6072148); SRVR:DM5PR03MB2985; BCL:0; PCL:0; RULEID:; SRVR:DM5PR03MB2985; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2985; 4:WK2txku+ikRqCJuUDmeg0QfP6M2yJM7zia8JWmMNRKsXkjoNX1VULM5aeduKdMZHt8f1RSdPXOmnrgIdzgR5BXhW7aplwnYkjpGJy/1kEg7xfyld0fyuabGH47CS+OzNiKnMcFEpviKoe2qp89fIovBuFvTQCv8Lz9r/atENZROCrZp8OxzdXGM3h6XKNsnev0zfAfVaFY0DmuLrzJCKoJtL4cbmtVhcYsQmtYjjOLeczSB/2v2B80mhr5qSFOXwyvX1cbnuukcBjrLyuukQS4AOcUOAgFPxQlAYABZmBOrrfaBS9uDT3ldasnPuUuDzp/ATdDGkLfbw8lRjcjfIghDTS60f5zi02Wswxs6o80fV6AYlywtwZ5AHHICRx6qjn83rhosFGmd+phHcyXinE9iAwWekGgDUgjb2WG6c33VPgZEY0rtpkVSqu0ZkfuyOuSZNkErnpmQGP5nV+Tj8YQ1PSqp5z4p+3u2DImzzlEpyAKJSnj8QofRaAiAr3dLr/i1Z09bMHa7Tlcz8mN3nzknAh/oyMGvXo/26efTCXPUjy/HsTK6EbCSHu6w2aaJddX4+nT9TAbiASeUWjEcRssTO82Nw/yLRsrGwAufAqR8/1yG5GbP7zkgiUmSchjbZmYWZqzGrDIBNyDMoolXZ0aU6nUIQFf90FBmBN4zMJdYaNXSPf/6z7K+v+ZqC/aZOWgJW/fWkXWHkhyzsjCE8qQ== X-Forefront-PRVS: 0144B30E41 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2985; 23:lJVhxjhjevf7xbDtFUNxIj9tM7dl/UkYLDaR0tOvy?= =?us-ascii?Q?ZLUTrNbkHiY0i+wcnC8oPlBRqfyDO8+6RggK8UTnohUOEw5vV4njwzDvYdRE?= =?us-ascii?Q?Rkf7O388CevyOPtuMo8SumVqhBOzJlhKRDMwPwuHd5RQ31D5J5tUSzYzLNYg?= =?us-ascii?Q?hK0sWbwvKlXPeaKfbBVwPS+6zw9RqKPHlZT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F87hJ+dyYZkuL0Fv05QSC9EMS+bqM1bm/S6Yv8m7C0N1o6Q8bkSRyCsdYjgz1XCO8FR1DZ4cCHm2FFqBKNGJwroiYfLEenTUWU4rsyg/S7AhjU/jhV1M0AIO7K5/LyP39NM8Sda0qn5oBm1HfWbgD9YAQqBlsZdl9sGYfaLPiKl1UJgcrgdOLbryDcmraRsp9NCQreNiO5u7xhkJwYI3J50UNjtSjelSmzxwFWkAH+X6LVnQ8+kIIUdiUWxsbpe+yRex3nMUJpORW9RH4TzVq1OhF6MZHM0s99FEeAsB1uUUBuRebsHZX1h+mpXv295dAHsnO/nFU5F84alOoAqg2RudzG+mIZoMeP9tXg92xxU3P1070JrXumGBoBdVdfkGctoNOf30w9xEI3wvD8RqqERYxl8vD1kw== X-OriginatorOrg: freescale.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2016 09:21:19.0501 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2985 Subject: [lng-odp] [PATCH] linux-generic: move tm system barrier to tm group X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Xuelin Shi since tm thread is handling tm group, move the thread based barrier to tm group. otherwise, packet cannot get into the second tm system in the same group. Signed-off-by: Xuelin Shi --- platform/linux-generic/include/odp_traffic_mngr_internal.h | 3 ++- platform/linux-generic/odp_traffic_mngr.c | 12 +++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) -- 1.8.3.1 Reviewed-by: Balasubramanian Manoharan diff --git a/platform/linux-generic/include/odp_traffic_mngr_internal.h b/platform/linux-generic/include/odp_traffic_mngr_internal.h index 858183b..9f821fe 100644 --- a/platform/linux-generic/include/odp_traffic_mngr_internal.h +++ b/platform/linux-generic/include/odp_traffic_mngr_internal.h @@ -367,7 +367,6 @@ struct tm_system_s { _odp_tm_group_t odp_tm_group; odp_ticketlock_t tm_system_lock; - odp_barrier_t tm_system_barrier; odp_barrier_t tm_system_destroy_barrier; odp_atomic_u64_t destroying; _odp_int_name_t name_tbl_id; @@ -416,8 +415,10 @@ struct tm_system_group_s { tm_system_group_t *prev; tm_system_group_t *next; + odp_barrier_t tm_group_barrier; tm_system_t *first_tm_system; uint32_t num_tm_systems; + uint32_t first_enq; pthread_t thread; pthread_attr_t attr; }; diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index a1f990f..62e5c63 100644 --- a/platform/linux-generic/odp_traffic_mngr.c +++ b/platform/linux-generic/odp_traffic_mngr.c @@ -1854,6 +1854,7 @@ static int tm_enqueue(tm_system_t *tm_system, tm_queue_obj_t *tm_queue_obj, odp_packet_t pkt) { + tm_system_group_t *tm_group; input_work_item_t work_item; odp_packet_color_t pkt_color; tm_wred_node_t *initial_tm_wred_node; @@ -1868,9 +1869,10 @@ static int tm_enqueue(tm_system_t *tm_system, if (queue_tm_reorder(&tm_queue_obj->tm_qentry, &pkt_hdr->buf_hdr)) return 0; - if (tm_system->first_enq == 0) { - odp_barrier_wait(&tm_system->tm_system_barrier); - tm_system->first_enq = 1; + tm_group = GET_TM_GROUP(tm_system->odp_tm_group); + if (tm_group->first_enq == 0) { + odp_barrier_wait(&tm_group->tm_group_barrier); + tm_group->first_enq = 1; } pkt_color = odp_packet_color(pkt); @@ -2327,7 +2329,7 @@ static void *tm_system_thread(void *arg) input_work_queue = tm_system->input_work_queue; /* Wait here until we have seen the first enqueue operation. */ - odp_barrier_wait(&tm_system->tm_system_barrier); + odp_barrier_wait(&tm_group->tm_group_barrier); main_loop_running = true; destroying = odp_atomic_load_u64(&tm_system->destroying); @@ -2625,6 +2627,7 @@ static _odp_tm_group_t _odp_tm_group_create(const char *name ODP_UNUSED) tm_group = malloc(sizeof(tm_system_group_t)); memset(tm_group, 0, sizeof(tm_system_group_t)); + odp_barrier_init(&tm_group->tm_group_barrier, 2); /* Add this group to the tm_group_list linked list. */ if (tm_group_list == NULL) { @@ -2868,7 +2871,6 @@ odp_tm_t odp_tm_create(const char *name, tm_system->_odp_int_timer_wheel = _ODP_INT_TIMER_WHEEL_INVALID; odp_ticketlock_init(&tm_system->tm_system_lock); - odp_barrier_init(&tm_system->tm_system_barrier, 2); odp_atomic_init_u64(&tm_system->destroying, 0); tm_system->_odp_int_sorted_pool = _odp_sorted_pool_create(