From patchwork Tue Jul 25 18:39:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Zhou X-Patchwork-Id: 793589 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 3xH6VG0qS2z9ryv for ; Wed, 26 Jul 2017 04:39:49 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 4460BAB8; Tue, 25 Jul 2017 18:39:46 +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 BD0ECAA6 for ; Tue, 25 Jul 2017 18:39:45 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 2436B1BB for ; Tue, 25 Jul 2017 18:39:45 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id c23so13502224pfe.5 for ; Tue, 25 Jul 2017 11:39:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id :content-transfer-encoding; bh=OLDEY5ekoPK6qZ3cRP1zssXeKiF4Cr56FfvnTtwXBY4=; b=pOS2kKLMfsOjuM1+503MG2eoGjE3m5nntOCw89r/juTNwDlXL/bJL9lGKhP4vPxHOV pzoLbKAAPFO02qy9a5c115oZq2Z0t5wZLGnwZbbpg0LTbYhde8A9Me8Nxst9EUyvCsh8 e25JmyJnaqG2fYFVEgEQBlxMVAQ6+Nwle41l63xMKEcEosaqJXQON4yC0Vf/B/uweJ4+ C64oCvLe9OcZhMmvxU18QfSCqSDkTKruf85xuZdgSApxx05LMj6pxNgtXfJIWo9xFY7O NfSZLr82/zI3Y5Q+Avzw3CmYQveJV3S+zV+2+lYGKZp3Olw48FkR6DlhOmlxP/WUpOG2 irmA== X-Gm-Message-State: AIVw113CTZDI1wNfWzpK5eHnJDLoTTllB2O91GFPapfladvYaKyBpqoS Hp8vIhks51VHZTD8 X-Received: by 10.101.76.76 with SMTP id l12mr13023942pgr.161.1501007984704; Tue, 25 Jul 2017 11:39:44 -0700 (PDT) Received: from ubuntu.localdomain ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id d29sm32736241pfb.11.2017.07.25.11.39.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Jul 2017 11:39:44 -0700 (PDT) From: Andy Zhou To: dev@openvswitch.org Date: Tue, 25 Jul 2017 11:39:27 -0700 Message-Id: <1501007967-75916-1-git-send-email-azhou@ovn.org> X-Mailer: git-send-email 1.9.1 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ilya Maximets Subject: [ovs-dev] [PATCH] bond: Adjust bond hash masks 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 Commit 42781e77035d (bond: Unify hash functions in hash action and entry lookup.) changed the BM_TCP's hash function, but did not update hash mask fields accordingly. Found by inspection. CC: Ilya Maximets Signed-off-by: Andy Zhou Acked-by: Ilya Maximets --- ofproto/bond.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ofproto/bond.c b/ofproto/bond.c index e09136efbd98..7d8d6560c690 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -1798,11 +1798,12 @@ choose_output_slave(const struct bond *bond, const struct flow *flow, return NULL; } if (wc) { - flow_mask_hash_fields(flow, wc, NX_HASH_FIELDS_SYMMETRIC_L4); + flow_mask_hash_fields(flow, wc, + NX_HASH_FIELDS_SYMMETRIC_L3L4_UDP); } /* Fall Through. */ case BM_SLB: - if (wc) { + if (wc && balance == BM_SLB) { flow_mask_hash_fields(flow, wc, NX_HASH_FIELDS_ETH_SRC); } e = lookup_bond_entry(bond, flow, vlan);