From patchwork Fri Aug 11 10:56:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fischetti, Antonio" X-Patchwork-Id: 800495 X-Patchwork-Delegate: dlu998@gmail.com 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=) 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 3xTMQ16zNwz9t2h for ; Fri, 11 Aug 2017 20:56:41 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 12048AE0; Fri, 11 Aug 2017 10:56:40 +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 7BCB2ABB for ; Fri, 11 Aug 2017 10:56:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 67C633CF for ; Fri, 11 Aug 2017 10:56:38 +0000 (UTC) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Aug 2017 03:56:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,357,1498546800"; d="scan'208";a="138478872" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by fmsmga005.fm.intel.com with ESMTP; 11 Aug 2017 03:56:37 -0700 From: antonio.fischetti@intel.com To: dev@openvswitch.org Date: Fri, 11 Aug 2017 11:56:36 +0100 Message-Id: <1502448996-7833-1-git-send-email-antonio.fischetti@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [ovs-dev] [PATCH] dpif-netdev: Fix comments in function headers 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 Fix comments for emc_processing and dp_netdev_input__ regarding md_is_valid. Signed-off-by: Antonio Fischetti Acked-by: Cian Ferriter --- lib/dpif-netdev.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index e2cd931..5c5c20e 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -4660,8 +4660,11 @@ dp_netdev_queue_batches(struct dp_packet *pkt, * The function returns the number of packets that needs to be processed in the * 'packets' array (they have been moved to the beginning of the vector). * - * If 'md_is_valid' is false, the metadata in 'packets' is not valid and must - * be initialized by this function using 'port_no'. + * For performance reasons a caller may choose not to initialize the metadata + * in 'packets_'. If 'md_is_valid' is false, the metadata in 'packets' + * is not valid and must be initialized by this function using 'port_no'. + * If 'md_is_valid' is true, the metadata is already valid and 'port_no' + * will be ignored. */ static inline size_t emc_processing(struct dp_netdev_pmd_thread *pmd, @@ -4894,10 +4897,8 @@ fast_path_processing(struct dp_netdev_pmd_thread *pmd, /* Packets enter the datapath from a port (or from recirculation) here. * - * For performance reasons a caller may choose not to initialize the metadata - * in 'packets': in this case 'mdinit' is false and this function needs to - * initialize it using 'port_no'. If the metadata in 'packets' is already - * valid, 'md_is_valid' must be true and 'port_no' will be ignored. */ + * When 'md_is_valid' is true the metadata in 'packets' are already valid. + * When false the metadata in 'packets' need to be initialized. */ static void dp_netdev_input__(struct dp_netdev_pmd_thread *pmd, struct dp_packet_batch *packets,