{"id":805731,"url":"http://patchwork.ozlabs.org/api/patches/805731/?format=json","web_url":"http://patchwork.ozlabs.org/project/openvswitch/patch/1503633771-112384-2-git-send-email-yi.y.yang@intel.com/","project":{"id":47,"url":"http://patchwork.ozlabs.org/api/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":"<1503633771-112384-2-git-send-email-yi.y.yang@intel.com>","list_archive_url":null,"date":"2017-08-25T04:02:49","name":"[ovs-dev,v4,1/3] nsh: fix an implicit bug in nsh_hdr_len","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"d4e54f09d374a19fc9b3c87eca27019216694811","submitter":{"id":68962,"url":"http://patchwork.ozlabs.org/api/people/68962/?format=json","name":"Yang, Yi","email":"yi.y.yang@intel.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/openvswitch/patch/1503633771-112384-2-git-send-email-yi.y.yang@intel.com/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/805731/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/805731/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 3xdnh61qyQz9t4X\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 25 Aug 2017 14:08:06 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 85292BEB;\n\tFri, 25 Aug 2017 04:07:21 +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 1B8A8BEE\n\tfor <dev@openvswitch.org>; Fri, 25 Aug 2017 04:07:20 +0000 (UTC)","from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id EFA71153\n\tfor <dev@openvswitch.org>; Fri, 25 Aug 2017 04:06:50 +0000 (UTC)","from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Aug 2017 21:06:50 -0700","from unknown (HELO localhost.localdomain.bj.intel.com)\n\t([10.240.224.185])\n\tby orsmga001.jf.intel.com with ESMTP; 24 Aug 2017 21:06:49 -0700"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-ExtLoop1":"1","X-IronPort-AV":"E=Sophos; i=\"5.41,424,1498546800\"; d=\"scan'208\";\n\ta=\"1165972278\"","From":"Yi Yang <yi.y.yang@intel.com>","To":"dev@openvswitch.org","Date":"Fri, 25 Aug 2017 12:02:49 +0800","Message-Id":"<1503633771-112384-2-git-send-email-yi.y.yang@intel.com>","X-Mailer":"git-send-email 2.1.0","In-Reply-To":"<1503633771-112384-1-git-send-email-yi.y.yang@intel.com>","References":"<1503633771-112384-1-git-send-email-yi.y.yang@intel.com>","X-Spam-Status":"No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED,\n\tRP_MATCHES_RCVD autolearn=unavailable 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 v4 1/3] nsh: fix an implicit bug in nsh_hdr_len","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":"Operator '*' will be executed prior to operator '>>',\nbut we expect operator '>>' is executed prior to '*',\nthis patch fixed the issue.\n\nSigned-off-by: Yi Yang <yi.y.yang@intel.com>\n---\n include/openvswitch/nsh.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/include/openvswitch/nsh.h b/include/openvswitch/nsh.h\nindex f4ccadc..a3611d0 100644\n--- a/include/openvswitch/nsh.h\n+++ b/include/openvswitch/nsh.h\n@@ -113,7 +113,7 @@ struct nsh_hdr {\n static inline uint16_t\n nsh_hdr_len(const struct nsh_hdr *nsh)\n {\n-    return 4 * (ntohs(nsh->ver_flags_len) & NSH_LEN_MASK) >> NSH_LEN_SHIFT;\n+    return ((ntohs(nsh->ver_flags_len) & NSH_LEN_MASK) >> NSH_LEN_SHIFT) << 2;\n }\n \n static inline struct nsh_md1_ctx *\n","prefixes":["ovs-dev","v4","1/3"]}