From patchwork Thu Sep 28 08:58:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurucharan Shetty X-Patchwork-Id: 819721 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 3y34Vq3kB7z9s7h for ; Fri, 29 Sep 2017 05:28:49 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id CDFA2B00; Thu, 28 Sep 2017 19:28:45 +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 E9551A7C for ; Thu, 28 Sep 2017 19:28:44 +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 C6EFFAA for ; Thu, 28 Sep 2017 19:28:43 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id a7so2261689pfj.5 for ; Thu, 28 Sep 2017 12:28:43 -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:subject:date:message-id; bh=7r2CHYX+lGwni8NNRjGvLWaCDbBRzHolSDDyhMD60xY=; b=O0fU/2Ph+sMUJkK/D27Vc7vn4iaGWXTceHn0FAqpXfP/p1Rj/naPgEi9cK1ZhXVN1V gLC6FXL1JV968Sk/4BIwj5cho59Xjga1mXb3dDyRH6ar6qa7S9ErEm2iBllRZGGHpjMi hBOXYFS4HHIWSylFCS+d/Y/45frgLzZ1dJ6k7bjakLDB3KY2qIfUoN+uzGYj+S/nzJpV Wuw0OGiuyzBl5sLUZZCIX+rROC2LDg146YJqTFdrMg1kMd7ydr3zfjzFObHr7Qiy9Z/g q5rjLQTqwhwkHrCLooPbV5KjcqttbxGM0kxMmYmb8F01SAIFdMOOj71sUmVfHENIxcyF GXqA== X-Gm-Message-State: AHPjjUjPFUiOvSghH6skgQEfiFLcLetRSeWjpveGTamfqrDTTSgcJ8XC w8h3z8FuN57W27XbG5he1tpmWQ== X-Google-Smtp-Source: AOwi7QCvzimHqmUwo3oZFheAKgd10cNIdtYhQpL43Unk550dTnHgUfHZUuIZSDfoXrJw252LYPmwYQ== X-Received: by 10.98.86.28 with SMTP id k28mr5198727pfb.89.1506626923239; Thu, 28 Sep 2017 12:28:43 -0700 (PDT) Received: from ubuntu.eng.vmware.com ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id b65sm3997972pfj.97.2017.09.28.12.28.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Sep 2017 12:28:42 -0700 (PDT) From: Gurucharan Shetty To: dev@openvswitch.org Date: Thu, 28 Sep 2017 01:58:04 -0700 Message-Id: <1506589084-7163-1-git-send-email-guru@ovn.org> X-Mailer: git-send-email 1.9.1 X-Spam-Status: No, score=1.6 required=5.0 tests=DATE_IN_PAST_06_12, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] ovn/actions: Improve OVN load-balancing performance. 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 Currently, we send the first packet of every new connection to userspace to figure out the target IP address of load-balancing. With this patch, we use the selection method of dp_hash to prevent that situation. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- ovn/lib/actions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ovn/lib/actions.c b/ovn/lib/actions.c index d0d73b6..c987643 100644 --- a/ovn/lib/actions.c +++ b/ovn/lib/actions.c @@ -983,7 +983,7 @@ encode_CT_LB(const struct ovnact_ct_lb *cl, : MFF_LOG_DNAT_ZONE - MFF_REG0; struct ds ds = DS_EMPTY_INITIALIZER; - ds_put_format(&ds, "type=select"); + ds_put_format(&ds, "type=select,selection_method=dp_hash"); BUILD_ASSERT(MFF_LOG_CT_ZONE >= MFF_REG0); BUILD_ASSERT(MFF_LOG_CT_ZONE < MFF_REG0 + FLOW_N_REGS);