From patchwork Mon Jul 8 16:51:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashish Varma X-Patchwork-Id: 1129184 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="NS7ODnjc"; dkim-atps=neutral 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 45jBZ63R19z9sPP for ; Tue, 9 Jul 2019 03:01:49 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 70E4428E2; Mon, 8 Jul 2019 17:01:47 +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 F0E982636 for ; Mon, 8 Jul 2019 16:56:11 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 2ACE58A8 for ; Mon, 8 Jul 2019 16:56:10 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id z75so7987591pgz.5 for ; Mon, 08 Jul 2019 09:56:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=KEcbYL54HfKEMwiA6rYE+G6WTZMzOqS9uN5DJhRx5ig=; b=NS7ODnjc2sxjQnArZYvhoasGWK8AHA/DxYS2jqMxEHeMkfRlzmYvZJDD/w/WXxtpvF cnys2HE4fu4ff0xhcC0vEVuaOSRtSd5bZfLTBU1C9wTUjgtrnGiR/rh4+qsNvdAH0YOz ZFKV9YYZys9VfBZQDK6+thI/29yDVWtqIfQmUc3GpYgI3PYV1K5YF5Z+WZbh00WSRaLm uPEMnM/ClN6MD4mqz5neGblZ4vaQBPwdA2C3woyRgj1CzviFFqGAvLNjqyH/5A06d3CL MXiZmvHZWbDsvEGULXlywpuIZFwlNCWopvKl4u9hWecGocmiL2vvDZPZoce4xIjKaQF4 8QRA== 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=KEcbYL54HfKEMwiA6rYE+G6WTZMzOqS9uN5DJhRx5ig=; b=DyViQkOgFcWYFowjgwyK3Sy7JDWMWC2aiS70WDB5YBy8+nGRk3rREQnThPjtH8X30p DD8oMZzp9DJfO7lxEHXc0j8X9EdyED7cB4WNuRZbJud5jEXzWkGO4qC0Tu/J620kpcku 0C73jUU/IW33uNhdY/2f5+++DWVrb3486hSJlvwGQ4QsJvVceDlJW9koC6pPiY1oYZSp SJqYrDteblkkBYHi1WaQokPBLyrOksWW6IQHw03JMrQJR/9wHACnzbzkmNgc+fi3+TuB SlaP2NWY6ylg3IoYgO69w5idc3OaSKiS434Pjq/5DF12zNnhRsA0eweenozIeIilTRrl 8Akw== X-Gm-Message-State: APjAAAUshxR3wb27c//kQbsEFt8XeWZdeQ2iRRdeSPFMGa21ZDNMxsCn WnmGSx2oow8TOkEILheE1MuoK+GAsOc= X-Google-Smtp-Source: APXvYqxyrGxg4gqUhMpRL3uxAC7cyaz0U4eJtsIsVb4o+vLjqAmuZzKH6rZqYsT4g0q0vMZTxOD0DQ== X-Received: by 2002:a63:6d8d:: with SMTP id i135mr24854169pgc.303.1562604969458; Mon, 08 Jul 2019 09:56:09 -0700 (PDT) Received: from ashish-ubuntu-Desktop.eng.vmware.com ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id r188sm30465460pfr.16.2019.07.08.09.56.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Jul 2019 09:56:08 -0700 (PDT) From: Ashish Varma To: dev@openvswitch.org Date: Mon, 8 Jul 2019 09:51:29 -0700 Message-Id: <1562604689-16813-1-git-send-email-ashishvarma.ovs@gmail.com> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH v2] rhel: Fixed a bug for checking the correct major version and revision. 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 Fixed a bug where checking for major version 3.10 and major revision not equal to 327 or 693 or 957 should have gone to the default else at the end. In the current code, the default else condition will not get executed for kernel with major version 3.10 and major revision not equal to 327/693/957 resulting in failure to load the kernel module. Fixes: 402efbe4e176 ("rhel: Add 4.12 kernel support in ovs-kmod-manage.sh") Signed-off-by: Ashish Varma --- v1-v2: Added the Fixes tag. --- rhel/openvswitch-kmod-fedora.spec.in | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in index 92d763f..27f443a 100644 --- a/rhel/openvswitch-kmod-fedora.spec.in +++ b/rhel/openvswitch-kmod-fedora.spec.in @@ -90,13 +90,12 @@ if grep -qs "suse" /etc/os-release; then if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh fi -elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ]; then - if [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \ - [ "$major_rev" = "957" ]; then - # For RHEL 7.2, 7.4 and 7.6 - if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then - %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh - fi +elif [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ] && + { [ "$major_rev" = "327" ] || [ "$major_rev" = "693" ] || \ + [ "$major_rev" = "957" ]; }; then + # For RHEL 7.2, 7.4 and 7.6 + if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then + %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh fi else # Ensure that modprobe will find our modules.