From patchwork Mon Feb 11 02:56:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Darrell Ball X-Patchwork-Id: 1039577 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sQj4y9Uo"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43yVrf6mDWz9s5c for ; Mon, 11 Feb 2019 14:00:02 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id A7DDD2309; Mon, 11 Feb 2019 02:57:12 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 5B83622C5 for ; Mon, 11 Feb 2019 02:56:50 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 141245E4 for ; Mon, 11 Feb 2019 02:56:50 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id y4so4293565pgc.12 for ; Sun, 10 Feb 2019 18:56:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=cAHE/dJMBq8xu9+SfOB8ESoQ8JThrS3AlocNO6CcUCE=; b=sQj4y9UoxBySOzeS0OydSpRG2N+B7lOR+SSGub6uEMmKqX61oIgoduEkHtAfVNDPY3 ikDCXihZqQ31gN/L5fg/hq90vpLrk5R3ngDUzlKb93UaJVekvO8oS7S37gkROPjsrpoA Lu6geqS1E0Ad9OwWPBS1EJckbG6WGvab2wCq0vN/reei90SSOmr83L3DfP8zURji1Qke m6mK2FkJelZP5AY9wD94REXf8VetrFWxhmYMXhaHB+fXZkuBDtvBfPidzdtQJA4j160f nJc5PcRAImBicoJSycezMLWT3U9vlpZ4pcsx6gNyZazTSwox+zwQMyK50EHA+mFAlSt/ UiZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=cAHE/dJMBq8xu9+SfOB8ESoQ8JThrS3AlocNO6CcUCE=; b=XMnVA9Z3r8mVFIqz4W47w208aZTbuvHd6i0oaNiOH9pmqs3BCeCyC8O+rrtaRcZFjz QmKXktScUA+V2ydtOAYWcRU5ZC/+hoBHVOq1LTlNAzwi7+GwEMYeO2oF+yF05V3hPCDk 5NdaiG68Ae+WUTPqfitYMLFu6Q8ntdv+IluTjKJHVfIbbYwSFOKo5f+fVRZeJw/4IcRA 8GhicL3ALqUxJ62V7GtKQc9ooCTb0X2VIgkio7JIffbU2fYbJeCazSyQZGIXJI7MUiLL vtPuvFtRxgU/+iyxvuNlmPHXgOAv/3MsZmc3uOjc8Y2i+epL0efShxevaG7MQ3AwcNyS swxA== X-Gm-Message-State: AHQUAubZwP2BFwpLKHE1Si16lj+mT+XnVG+asv5rBexnQHznuNyA2afC PaMIZVnPkej3YVVh68VEDRQ= X-Google-Smtp-Source: AHgI3IaYLonU42BiXBRsLiBagb58h6myQikaqj4f+dAw2jsIpG4TiydwJYsWtAL3JBTYJYLVOLkinA== X-Received: by 2002:a63:4e05:: with SMTP id c5mr131440pgb.393.1549853809762; Sun, 10 Feb 2019 18:56:49 -0800 (PST) Received: from ubuntu.localdomain (c-76-102-76-212.hsd1.ca.comcast.net. [76.102.76.212]) by smtp.gmail.com with ESMTPSA id b24sm12830895pfe.136.2019.02.10.18.56.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Feb 2019 18:56:49 -0800 (PST) From: Darrell Ball To: dlu998@gmail.com, dev@openvswitch.org Date: Sun, 10 Feb 2019 18:56:29 -0800 Message-Id: <1549853790-43330-8-git-send-email-dlu998@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1549853790-43330-1-git-send-email-dlu998@gmail.com> References: <1549853790-43330-1-git-send-email-dlu998@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [patch v12 7/8] dp-packet: Add 'do_not_steal' packet batch flag. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org This is needed in a subsequent patch and may otherwise be useful. Signed-off-by: Darrell Ball --- lib/dp-packet.h | 2 ++ lib/dpif-netdev.c | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/dp-packet.h b/lib/dp-packet.h index 034b81b..c4ecd2d 100644 --- a/lib/dp-packet.h +++ b/lib/dp-packet.h @@ -741,6 +741,7 @@ enum { NETDEV_MAX_BURST = 32 }; /* Maximum number packets in a batch. */ struct dp_packet_batch { size_t count; bool trunc; /* true if the batch needs truncate. */ + bool do_not_steal; /* Indicate that the packets should not be stolen. */ struct dp_packet *packets[NETDEV_MAX_BURST]; }; @@ -795,6 +796,7 @@ dp_packet_batch_init_packet(struct dp_packet_batch *batch, struct dp_packet *p) { dp_packet_batch_init(batch); batch->count = 1; + batch->do_not_steal = false; batch->packets[0] = p; } diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 0f57e3f..47e6c80 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -3716,6 +3716,7 @@ dpif_netdev_execute(struct dpif *dpif, struct dpif_execute *execute) } dp_packet_batch_init_packet(&pp, execute->packet); + pp.do_not_steal = true; dp_netdev_execute_actions(pmd, &pp, false, execute->flow, execute->actions, execute->actions_len); dp_netdev_pmd_flush_output_packets(pmd, true);