From patchwork Fri Jul 19 01:43:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yifeng Sun X-Patchwork-Id: 1133882 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="IX955acw"; 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 45qYgr29sXz9s3Z for ; Fri, 19 Jul 2019 11:43:51 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B7B271E25; Fri, 19 Jul 2019 01:43:48 +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 BF5D61C88 for ; Fri, 19 Jul 2019 01:43:29 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6F104896 for ; Fri, 19 Jul 2019 01:43:29 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id r1so13415436pfq.12 for ; Thu, 18 Jul 2019 18:43:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=bd6YU5K84RwX9WCZjePr6xV+8Gaqht9Y2SHT6S6Mdkw=; b=IX955acweeRaj8/19MyenWoWsJdg/ii3bQxM+79xlhB+XGtNheVItz73c6i9T37C4T +R4BJtq5fOql9uI1AoxpRPGkwJ9Jc/yLzowP2PqgfSZrJchEIUMOJTbBl8Sbfp9BBIgU 1Giox4MZaw/YqXxJeQs5O8xkS4AFH49xRZLsC2JIGnqKQLxFSoDPdprWDGBXyCWkHFUB 0wB6rPeomRvO366ZEBPM1Z2j+gUl/CoB5DLN2iU80lRKFWUxSCU5mxaGmH8kfzc86lII FZpHejOF6WY3DiPhiFjTrr2NsvCntkIPSsmGu13hVVHkl2oWvU+z7rzZOjfIi6qbWcGW xDZA== 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; bh=bd6YU5K84RwX9WCZjePr6xV+8Gaqht9Y2SHT6S6Mdkw=; b=ZdeVszH/T/omyebdbvoVxK1hOfztW7E7+LJRp6mgIGs2zM8/sn43qoo7aWDxOA06nv OPErjSLV3dgAYPrNYInfl41fnnqy+x4zB2e/nV5sk+vkJqS3nPJehZEqyR1W3n1CiXI2 Kj7NOE+7lrtQBIWBYc2o8c4Xj8i+SOMyvO1la62JJHaBOHzK6FwPQygilpv49Q1WWnxo sskWu1gUaIwK7nGcs+jhuqZlSl1RsbOxFinkoIBOb/ViyWbqCI/iiQCXzEdyLxRyYYe2 RZp4ROBASZtLLDx2zOA88VCCW+gEzjrHAA5Brr8cFXlKgqm20VTtrVBEo+pNtLlef7h5 yEbQ== X-Gm-Message-State: APjAAAWPuqiFL+6R8GdBqQKX6hn6NT0wyg7fkGGpaHUVJY1/9nUUoqh5 6IYICzPnMvOjXnwXyZF0k1FK3u7eYHs= X-Google-Smtp-Source: APXvYqzO4GaR/5TZS6XEXBHvwYj13Xfe1WO113vQXzmRTcahtrjixwvThU0qUb1wjJ4PGllqmnPiOg== X-Received: by 2002:a65:5348:: with SMTP id w8mr50462406pgr.176.1563500608532; Thu, 18 Jul 2019 18:43:28 -0700 (PDT) Received: from kern417.eng.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id q4sm26712270pjq.27.2019.07.18.18.43.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Jul 2019 18:43:27 -0700 (PDT) From: Yifeng Sun To: dev@openvswitch.org Date: Thu, 18 Jul 2019 18:43:20 -0700 Message-Id: <1563500600-4853-1-git-send-email-pkusunyifeng@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] datapath: Print friendly error message when conntrack fails to init 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 On 4.14 kernels, if kernel isn't configured with CONFIG_NF_CONNTRACK_IPV4 and CONFIG_NF_CONNTRACK_IPV6, openvswitch module will fail to load. The error message is "openvswitch: failed to init nf_conncount -91". This patch prints helpful error message for this case. Signed-off-by: Yifeng Sun --- datapath/conntrack.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/datapath/conntrack.c b/datapath/conntrack.c index 292febb3c83e..ca56428cd78b 100644 --- a/datapath/conntrack.c +++ b/datapath/conntrack.c @@ -1864,6 +1864,10 @@ static int ovs_ct_limit_init(struct net *net, struct ovs_net *ovs_net) kfree(ovs_net->ct_limit_info->limits); kfree(ovs_net->ct_limit_info); pr_err("openvswitch: failed to init nf_conncount %d\n", err); + if (err == -EPROTOTYPE) { + pr_err("openvswitch: probably your kernel isn't configured with " + "CONFIG_NF_CONNTRACK_IPV4 and CONFIG_NF_CONNTRACK_IPV6.\n"); + } return err; } return 0;