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 854D9A04FC; Tue, 17 Dec 2019 12:14:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 54EF51BECF; Tue, 17 Dec 2019 12:14:19 +0100 (CET) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150078.outbound.protection.outlook.com [40.107.15.78]) by dpdk.org (Postfix) with ESMTP id A65FC2C17; Tue, 17 Dec 2019 12:14:17 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SremsTCs9Q48VpKnRwZRr1VwKf/yt/ClODADbER5wyJlP1Y3Xa8qR0IXfjheIy1KE/ZDTbuD85LUd65wJnqtg2SDbFzqNwpGxEVC0tPuH1ZQ7f9zuxgGJ5LdgStZT26FQm95Js0hlU00meLhg7G6IZeManZ3OU3fl/BHXIBIDWjyQVg5FgWHiD5t3iNJW2JcPoLrqJvP5I/ztZZgyrqV2Ze4iRfGC0KU4IAmKOvoZkGN9i4ymJqn+HOvspXkXH9rjkGfs3W7ONVzf1PzbgKala4VdaS+NQNtBP/Hbhe9zwPw7GZLAJJhSAdufFeT7bUhqLD9PZGB6t08mA1lkWCIPw== 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=ynD3kOR2QGVFsbRh+FzJ6slUOvKWpQV8C0OTzLoHiPg=; b=SDw6AJHScvIFeA0x8WXxVCBQoHR3b19Q0PMVUzYf7bjwlTOf+DyBb+KTJSc2aWnkO+1yINXmGwuGsm7XocHhasrvsRtA86QXxVl7a2UNpbNvJhsDuX3qlcG9vVoS8X4mxGBmYqcE01RrZfg53WYzk5YtjtAaAXW6M+PR9GMiO5uEt7fxz2RtQ6c5HEWUY3TRnfUiowZ2GjzqxijbizlqTMSdwJB9ZlTUhDzvKcsDkp+Hhq7Tl9EY3NF9h32uPTuhNOcUfY/yEDWbx1SY/y66Z66zh9cCobrV4f6Bjy/Jn71ZnMefWLOXCMxg4pW79/saPSFRNGo1NyjlpR9hQipD+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=dpdk.org smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=none pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ynD3kOR2QGVFsbRh+FzJ6slUOvKWpQV8C0OTzLoHiPg=; b=i8Yv4+Gwk+bzl/AED81SBy1ZBAlJXK43Mb9KVnH5kpUuax7AkuTMhSlC/+NetTIPE1LsdIZXpZAIlca38Dl8Oyy023QfdSy5pRuqoOCwYkvNrqf6e2jC6WXqg5Kou4hwopp9WBxO/4dt7uFi9f0sdkI0Kqr206iCUAZEecSsVOA= Received: from AM4PR0701CA0002.eurprd07.prod.outlook.com (2603:10a6:200:42::12) by DB8PR07MB6473.eurprd07.prod.outlook.com (2603:10a6:10:133::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2559.12; Tue, 17 Dec 2019 11:14:17 +0000 Received: from AM5EUR02FT035.eop-EUR02.prod.protection.outlook.com (2a01:111:f400:7e1e::201) by AM4PR0701CA0002.outlook.office365.com (2603:10a6:200:42::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2559.10 via Frontend Transport; Tue, 17 Dec 2019 11:14:16 +0000 Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; Received: from oa.msg.ericsson.com (192.176.1.74) by AM5EUR02FT035.mail.protection.outlook.com (10.152.8.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2538.14 via Frontend Transport; Tue, 17 Dec 2019 11:14:16 +0000 Received: from ESESSMB505.ericsson.se (153.88.183.166) by ESESBMR504.ericsson.se (153.88.183.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 17 Dec 2019 12:14:07 +0100 Received: from selio1a020.lmera.ericsson.se (153.88.183.153) by smtp.internal.ericsson.com (153.88.183.193) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Tue, 17 Dec 2019 12:14:06 +0100 Received: from breslau.lmera.ericsson.se (breslau.lmera.ericsson.se [150.132.109.241]) by selio1a020.lmera.ericsson.se (8.15.1+Sun/8.15.1) with ESMTP id xBHBE78I003981; Tue, 17 Dec 2019 12:14:07 +0100 (CET) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: CC: , , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , Date: Tue, 17 Dec 2019 12:13:44 +0100 Message-ID: <20191217111344.27468-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.176.1.74; IPV:; CTRY:SE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(39860400002)(396003)(136003)(199004)(189003)(246002)(5660300002)(8936002)(36756003)(186003)(26005)(86362001)(8676002)(336012)(2906002)(6916009)(7636002)(4744005)(4326008)(6666004)(70586007)(66574012)(478600001)(356004)(1076003)(316002)(54906003)(70206006)(956004)(2616005)(14773001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB8PR07MB6473; H:oa.msg.ericsson.com; FPR:; SPF:Pass; LANG:en; PTR:office365.se.ericsson.net; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 455c01eb-941d-4251-020c-08d782e2417a X-MS-TrafficTypeDiagnostic: DB8PR07MB6473: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1360; X-Forefront-PRVS: 02543CD7CD X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LEo+iG0U1gbuG9qFae+Gk12zG26sqlLsdLrfJt903A44Ce9hXZ798AZKE04n6SkSVj4nWrxXLQweWgQ2IDu2UypO4pCljXcA5Be9tMVsxLVATyld3s2tju6H5EYeFqkVSoUJ0k6t/ackM5D/YxlRcsvzfgnzmDVUJcU8poKYCKg6EhN0bjlc7LVhD5cOQVkxiv20WXo9Ggy9c8mDpsWipYIA1hs7S6K6BN4zxIIAhxb4R4/P3jquwrk29/rUUnPRbHOlUIqbqIdfsrY30h7oNbTgMRJYbFEcTj3m+VG8KWKqL6W+XYudmI5fkUvABMFAmRy4UQ27kdU7gr/4vxFi1fD4Yu9BYLsTEB6+BxHsvEoeNEi31oGW7TqjiHW5UOZRfqjOfX6IhASjlxTQahJTxdIxCjpU3t7yfgei4gX6LQdSS3RcptoTnwQLb4LrFFbsKP5zxJ/zbhLfRPR5qNGl4rVPnUTlHWe4GKsOL3s3s/YPErMInzTsvkoPm2goJAf7 X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2019 11:14:16.8428 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 455c01eb-941d-4251-020c-08d782e2417a X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74]; Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR07MB6473 Subject: [dpdk-dev] [PATCH] event/dsw: immediately flush buffers on zero-sized enqueue 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" Fix DSW's rte_event_enqueue_burst(), so that a call with a zero-sized event array immediately flushes the port's output buffers. Prior to this patch, the flush operation would be deferred to the next enqueue or dequeue call, which is inconsistent with DSW documentation. Fixes: 1c8e3caa3bfb ("event/dsw: add event scheduling and device start/stop") Cc: stable@dpdk.org Signed-off-by: Mattias Rönnblom --- drivers/event/dsw/dsw_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c index 61a66fabf..1641c2d06 100644 --- a/drivers/event/dsw/dsw_event.c +++ b/drivers/event/dsw/dsw_event.c @@ -1047,6 +1047,7 @@ dsw_event_enqueue_burst_generic(void *port, const struct rte_event events[], */ if (unlikely(events_len == 0)) { dsw_port_note_op(source_port, DSW_MAX_PORT_OPS_PER_BG_TASK); + dsw_port_flush_out_buffers(dsw, port); return 0; } -- 2.17.1