{"id":808675,"url":"http://patchwork.ozlabs.org/api/1.2/patches/808675/?format=json","web_url":"http://patchwork.ozlabs.org/project/openvswitch/patch/1504270911-8294-1-git-send-email-cian.ferriter@intel.com/","project":{"id":47,"url":"http://patchwork.ozlabs.org/api/1.2/projects/47/?format=json","name":"Open vSwitch","link_name":"openvswitch","list_id":"ovs-dev.openvswitch.org","list_email":"ovs-dev@openvswitch.org","web_url":"http://openvswitch.org/","scm_url":"git@github.com:openvswitch/ovs.git","webscm_url":"https://github.com/openvswitch/ovs","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1504270911-8294-1-git-send-email-cian.ferriter@intel.com>","list_archive_url":null,"date":"2017-09-01T13:01:51","name":"[ovs-dev] dpif-netdev: Rename \"size\" variable to \"cnt\".","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"8904dd13a05cfde51966c44bcaa0d4e66a274caa","submitter":{"id":70444,"url":"http://patchwork.ozlabs.org/api/1.2/people/70444/?format=json","name":"Ferriter, Cian","email":"cian.ferriter@intel.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/openvswitch/patch/1504270911-8294-1-git-send-email-cian.ferriter@intel.com/mbox/","series":[{"id":1020,"url":"http://patchwork.ozlabs.org/api/1.2/series/1020/?format=json","web_url":"http://patchwork.ozlabs.org/project/openvswitch/list/?series=1020","date":"2017-09-01T13:01:51","name":"[ovs-dev] dpif-netdev: Rename \"size\" variable to \"cnt\".","version":1,"mbox":"http://patchwork.ozlabs.org/series/1020/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/808675/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/808675/checks/","tags":{},"related":[],"headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkKBv4kssz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 23:01:59 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 0197BD1C;\n\tFri,  1 Sep 2017 13:01:58 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id D845CD1B\n\tfor <dev@openvswitch.org>; Fri,  1 Sep 2017 13:01:56 +0000 (UTC)","from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6A7A8B0\n\tfor <dev@openvswitch.org>; Fri,  1 Sep 2017 13:01:56 +0000 (UTC)","from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t01 Sep 2017 06:01:55 -0700","from sivswdev01.ir.intel.com (HELO localhost.localdomain)\n\t([10.237.217.45])\n\tby orsmga003.jf.intel.com with ESMTP; 01 Sep 2017 06:01:53 -0700"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-ExtLoop1":"1","X-IronPort-AV":"E=Sophos; i=\"5.41,458,1498546800\"; d=\"scan'208\";\n\ta=\"1010008081\"","From":"Cian Ferriter <cian.ferriter@intel.com>","To":"dev@openvswitch.org","Date":"Fri,  1 Sep 2017 14:01:51 +0100","Message-Id":"<1504270911-8294-1-git-send-email-cian.ferriter@intel.com>","X-Mailer":"git-send-email 1.7.0.7","X-Spam-Status":"No, score=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,\n\tRP_MATCHES_RCVD autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Subject":"[ovs-dev] [PATCH] dpif-netdev: Rename \"size\" variable to \"cnt\".","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"},"content":"Commit 72c84bc (dp-packet: Enhance packet batch APIs.) changed how the amount\nof packets to be processed is retrieved. In the process, the patch used \"size\"\nas the variable holding the amount of packets rather than \"cnt\". Change this\nback to match with the \"emc_processing()\" comment.\n\nSigned-off-by: Cian Ferriter <cian.ferriter@intel.com>\n---\nAlternatively the comment above \"emc_processing()\" could be changed:\n-/* Try to process all ('cnt') the 'packets' using only the exact match cache\n+/* Try to process all ('size') the 'packets' using only the exact match cache\n\n lib/dpif-netdev.c |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)","diff":"diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c\nindex 071ec14..08db217 100644\n--- a/lib/dpif-netdev.c\n+++ b/lib/dpif-netdev.c\n@@ -4872,13 +4872,13 @@ emc_processing(struct dp_netdev_pmd_thread *pmd,\n     struct netdev_flow_key *key = &keys[0];\n     size_t n_missed = 0, n_dropped = 0;\n     struct dp_packet *packet;\n-    const size_t size = dp_packet_batch_size(packets_);\n+    const size_t cnt = dp_packet_batch_size(packets_);\n     uint32_t cur_min;\n     int i;\n \n     atomic_read_relaxed(&pmd->dp->emc_insert_min, &cur_min);\n \n-    DP_PACKET_BATCH_REFILL_FOR_EACH (i, size, packet, packets_) {\n+    DP_PACKET_BATCH_REFILL_FOR_EACH (i, cnt, packet, packets_) {\n         struct dp_netdev_flow *flow;\n \n         if (OVS_UNLIKELY(dp_packet_size(packet) < ETH_HEADER_LEN)) {\n@@ -4887,7 +4887,7 @@ emc_processing(struct dp_netdev_pmd_thread *pmd,\n             continue;\n         }\n \n-        if (i != size - 1) {\n+        if (i != cnt - 1) {\n             struct dp_packet **packets = packets_->packets;\n             /* Prefetch next packet data and metadata. */\n             OVS_PREFETCH(dp_packet_data(packets[i+1]));\n@@ -4918,7 +4918,7 @@ emc_processing(struct dp_netdev_pmd_thread *pmd,\n     }\n \n     dp_netdev_count_packet(pmd, DP_STAT_EXACT_HIT,\n-                           size - n_dropped - n_missed);\n+                           cnt - n_dropped - n_missed);\n \n     return dp_packet_batch_size(packets_);\n }\n","prefixes":["ovs-dev"]}