From patchwork Mon Feb 24 22:42:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1243654 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.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.a=rsa-sha256 header.s=20161025 header.b=fn3Z7dxN; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RHC22gk1z9sRN for ; Tue, 25 Feb 2020 09:42:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E59C18614E; Mon, 24 Feb 2020 22:42:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QV_v6Sk0yQJt; Mon, 24 Feb 2020 22:42:52 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 71A0C844DC; Mon, 24 Feb 2020 22:42:52 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 58253C18DA; Mon, 24 Feb 2020 22:42:52 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id CA8F7C0177 for ; Mon, 24 Feb 2020 22:42:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C6FDF8733B for ; Mon, 24 Feb 2020 22:42:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bngeYNi5ZHmH for ; Mon, 24 Feb 2020 22:42:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by hemlock.osuosl.org (Postfix) with ESMTPS id 6F8B686DEA for ; Mon, 24 Feb 2020 22:42:50 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id y5so6083878pfb.11 for ; Mon, 24 Feb 2020 14:42:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=6JtHQeXocv4w69S1es14QqgG5pGsqcM9CQ/YG0dISwo=; b=fn3Z7dxNVGhLMu9R9n1PA7EZnmETgr8ia7tLSfq8andBfIMCI4SwveT7QeibU8rCJ7 HDorbyIgKPFhfnu4MwXtC560RSwYm8kD8jBOTnYyKXehD7URSa6pxP8JV0f5Xsl9Jfjp Em+sBH6jGxrqUCDOhByKj5RZsU3FCTYZeqeX4jpIvdUtpB62aHfp2SkqcXdlrZ2IlsCq ef3HlJJBqYgx6fafPK9sXzCZSSrCz8pRhXtygaMSWndmEICZ04UFMPW5zwjz+Xi4MXmf /3E/QlU6bdfcQWjIiPfoOjzlTgnu32NlbgjRkwdp0nfCxJTIGFrsardApSww2qhtabQF ZtZw== 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=6JtHQeXocv4w69S1es14QqgG5pGsqcM9CQ/YG0dISwo=; b=ZAWJmXLKI0TskUHzx/EVSaYywNR3tpJ2TjT93mc45BFXx/mtBnJNd5NOgs5iHIHuJR BT/4JwIBNMooXRyvriXcByAi8TemFXusBkPy1kvfai+HXcg4+QkjL0y484h4NVytyvNo J2sMFv9piTj1ojDMCaKrOCzFGR9ReYHkEtB/IDd1bKQJ5O9GG/leN7En17tWf8V6mBCN yAikYFhFR+nKR4M0oAWjbpjshaoP6WFx/bDPe60DsIJYFIXGc3X+D/ROGZ4EBZ+1Mk7N ynj9a07NpQUU2pZpBj+4rHgBpHpszy2UmTTC5//Xtm9ZKtBqt6snwF2ecKDsLU1WMRBo zBbw== X-Gm-Message-State: APjAAAU4PoKFwx99AUnSH37zSJ41dpZ1GbFI616TVyhyKZ8layvfHaXA igwD7de4CpOyHd2b3EEUoWLmx8+MkIk= X-Google-Smtp-Source: APXvYqysRS40Sdk6yNf/Vom7ti9PBtZqFRNcvlR+/F2G4kLiowuQeZB25JJYLk85UdPTmORdMCADyg== X-Received: by 2002:a63:2447:: with SMTP id k68mr54163633pgk.368.1582584169606; Mon, 24 Feb 2020 14:42:49 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id 133sm14320705pfy.14.2020.02.24.14.42.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Feb 2020 14:42:49 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Mon, 24 Feb 2020 14:42:30 -0800 Message-Id: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [ovs-dev] [PATCH 1/9] acinclude: Enable Linux kernel 5.5 X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Greg Rose --- acinclude.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index 1212a46..db64267 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -151,7 +151,7 @@ AC_DEFUN([OVS_CHECK_LINUX], [ AC_MSG_RESULT([$kversion]) if test "$version" -ge 5; then - if test "$version" = 5 && test "$patchlevel" -le 0; then + if test "$version" = 5 && test "$patchlevel" -le 5; then : # Linux 5.x else AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 5.0.x is not supported (please refer to the FAQ for advice)]) From patchwork Mon Feb 24 22:42:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1243658 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=silver.osuosl.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.a=rsa-sha256 header.s=20161025 header.b=UQ8OpLk6; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RHC86NHnz9sRl for ; Tue, 25 Feb 2020 09:42:59 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BD06C20766; Mon, 24 Feb 2020 22:42:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xkRZQxgyUny5; Mon, 24 Feb 2020 22:42:53 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 35B0F20409; Mon, 24 Feb 2020 22:42:53 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 202DDC1D89; Mon, 24 Feb 2020 22:42:53 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id C8EFCC0177 for ; Mon, 24 Feb 2020 22:42:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B59878733B for ; Mon, 24 Feb 2020 22:42:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E-GSjC5kssZ4 for ; Mon, 24 Feb 2020 22:42:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by hemlock.osuosl.org (Postfix) with ESMTPS id 4D33886DEA for ; Mon, 24 Feb 2020 22:42:51 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id g6so4633625plp.6 for ; Mon, 24 Feb 2020 14:42:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=yidHBtQ3QR8A1+TgJf3JwNMrQ74ZZvEtiMsK+WJKgb8=; b=UQ8OpLk693g+o5lBLPJpM2tpznFUoLtjbEH7b1BhArWvEuRVvUudCaxWkFDneR713K NdE8OBHGPlnVsGsyZFnqIPF0Yd3Bfg9kNcYYHpM1pFDpHol9SlWuCooQ118pDGd8iC0a eRHoDkfxziwim2SOyyulgAVWfjOYBkhbgXua1O6kEXG3FGT4r1bsHALljIZ2XtunHgJi +UlQF8uScsAWOqKpTE5Ddp4erNH1dT51fuGbg6YWpAtkbMhMXfLAy4FIxv5LQPdE3NcC Mn3UCyEUeeaCMRmsRoijm4yXyMiu9TLreaob36hsVmgwI+XhX1dMx4MJpwd00Ni0K2yM ykDQ== 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:in-reply-to :references; bh=yidHBtQ3QR8A1+TgJf3JwNMrQ74ZZvEtiMsK+WJKgb8=; b=iPfJm6iEqy2SU3dRNGxTIVUyts9zhdL/3vCMikiMSQtVyd3hQRqYox7QckIjoJP1+U 7qxmlVHInL2k4BIzzruLCLYHhWqsyPNC+AfyZgXfK9Z3ZGHX6jGIbvHua6r8dCbdrNYm 9tUeww1KbDCQF1DsuH4JDBhj7Y/LkIKgUUW30dt1kFdox0TG+4USHQw5/85ywUuJSiO2 ZDyqsj6LAEYja4hNOBOG+U/bWTirH+12h1rATyPpXa27jFkLNC/eriJjb5MBcjpUFtSa /wDtjoErnsuAzHD1uvAO1IfoxXTPLAiaNxzmtFPhQS9F9esKz33lKMOD3ESkQYFkq/nK sJ+g== X-Gm-Message-State: APjAAAUPYXjRTzeZPdeEVlnJVEVWbR9WkOr3qizdtzKFUjyZQ9i6g6+B hyGiP7sr0Es8X9b0AvIDlDpBBP/DXhg= X-Google-Smtp-Source: APXvYqz3ZxcJM8v8Qeks6ln3kxbczBOTm3SuG3k7vnmjpUwx1Nn80AEGb9mXXrlXg3HMHeZmgup5WQ== X-Received: by 2002:a17:90b:3011:: with SMTP id hg17mr1508657pjb.90.1582584170602; Mon, 24 Feb 2020 14:42:50 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id 133sm14320705pfy.14.2020.02.24.14.42.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Feb 2020 14:42:50 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Mon, 24 Feb 2020 14:42:31 -0800 Message-Id: <1582584158-16348-2-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> References: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH 2/9] compat: Fix up changes to inet frags in 5.1+ X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Since Linux kernel release 5.1 the fragments field of the inet_frag_queue structure is removed and now only the rb_fragments structure with an rb_node pointer is used for both ipv4 and ipv6. In addition, the atomic_sub and atomic_add functions are replaced with their equivalent long counterparts. Signed-off-by: Greg Rose --- acinclude.m4 | 2 ++ datapath/linux/compat/include/net/inet_frag.h | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index db64267..cad76c7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1067,6 +1067,8 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ [OVS_DEFINE([HAVE_RBTREE_RB_LINK_NODE_RCU])]) OVS_GREP_IFELSE([$KSRC/include/net/dst_ops.h], [bool confirm_neigh], [OVS_DEFINE([HAVE_DST_OPS_CONFIRM_NEIGH])]) + OVS_GREP_IFELSE([$KSRC/include/net/inet_frag.h], [fqdir], + [OVS_DEFINE([HAVE_INET_FRAG_FQDIR])]) if cmp -s datapath/linux/kcompat.h.new \ datapath/linux/kcompat.h >/dev/null 2>&1; then diff --git a/datapath/linux/compat/include/net/inet_frag.h b/datapath/linux/compat/include/net/inet_frag.h index 124c8be..e3c6df3 100644 --- a/datapath/linux/compat/include/net/inet_frag.h +++ b/datapath/linux/compat/include/net/inet_frag.h @@ -18,7 +18,16 @@ static inline bool inet_frag_evicting(struct inet_frag_queue *q) #ifdef HAVE_INET_FRAG_QUEUE_WITH_LIST_EVICTOR return !hlist_unhashed(&q->list_evictor); #else +/* + * We can't use acinclude.m4 to check this as the field 'fragments' + * also matches 'rb_fragments'. + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0) return (q_flags(q) & INET_FRAG_FIRST_IN) && q->fragments != NULL; +#else + return (q_flags(q) & INET_FRAG_FIRST_IN) && + q->rb_fragments.rb_node != NULL; +#endif #endif /* HAVE_INET_FRAG_QUEUE_WITH_LIST_EVICTOR */ } #endif /* HAVE_INET_FRAG_EVICTING */ @@ -29,6 +38,10 @@ static inline bool inet_frag_evicting(struct inet_frag_queue *q) #define inet_frag_lru_move(q) #endif +#ifdef HAVE_INET_FRAG_FQDIR +#define netns_frags fqdir +#endif + #ifndef HAVE_SUB_FRAG_MEM_LIMIT_ARG_STRUCT_NETNS_FRAGS #ifdef HAVE_FRAG_PERCPU_COUNTER_BATCH static inline void rpl_sub_frag_mem_limit(struct netns_frags *nf, int i) @@ -45,13 +58,21 @@ static inline void rpl_add_frag_mem_limit(struct netns_frags *nf, int i) #else /* !frag_percpu_counter_batch */ static inline void rpl_sub_frag_mem_limit(struct netns_frags *nf, int i) { +#ifdef HAVE_INET_FRAG_FQDIR + atomic_long_sub(i, &nf->mem); +#else atomic_sub(i, &nf->mem); +#endif } #define sub_frag_mem_limit rpl_sub_frag_mem_limit static inline void rpl_add_frag_mem_limit(struct netns_frags *nf, int i) { +#ifdef HAVE_INET_FRAG_FQDIR + atomic_long_add(i, &nf->mem); +#else atomic_add(i, &nf->mem); +#endif } #define add_frag_mem_limit rpl_add_frag_mem_limit #endif /* frag_percpu_counter_batch */ From patchwork Mon Feb 24 22:42:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1243656 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.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.a=rsa-sha256 header.s=20161025 header.b=Wp/tejAZ; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RHC62mh3z9sQx for ; Tue, 25 Feb 2020 09:42:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E6D5C86451; Mon, 24 Feb 2020 22:42:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6q594nHdUuJn; Mon, 24 Feb 2020 22:42:55 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id DCB23863D9; Mon, 24 Feb 2020 22:42:55 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C5621C0177; Mon, 24 Feb 2020 22:42:55 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id A78FDC1D88 for ; Mon, 24 Feb 2020 22:42:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A3A718506A for ; Mon, 24 Feb 2020 22:42:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29gbEvNk80LE for ; Mon, 24 Feb 2020 22:42:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by fraxinus.osuosl.org (Postfix) with ESMTPS id BDA5B86055 for ; Mon, 24 Feb 2020 22:42:52 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id u12so5851200pgb.10 for ; Mon, 24 Feb 2020 14:42:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0m43xGW6BXpk/qb8IsoPeDoKEGsCgYKItknbb0ttfUM=; b=Wp/tejAZcW8ytH7GlwGqqSXCJ7gaTJb8RsoxlOGYtVRv7IXx1R1o0CPi0/fS6pwgyF Tz3PCMnqbPRi5fzBdO57YawK5nHA+lI/vOSkWUICSHcF8II8A9daorODLOSF7hdJcdQp hCEBnWAAPYeL3ynScb950z3ufXETGPsk75NrBQXr9BpOL34872QdyxiCwhlQRFMCA5Ks JRrslV2YJWh7d4cr8v5mjAeGerRtqyLXJnl7bAxxlzYwjST+t30USWZDqhsTitzeFhvm ajtZQEcFVPfNOm7i0ROjKxXqQ8Hhwd3id206bEajCr+XREwmATyCkzg3bEdy747NucYA r3hg== 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:in-reply-to :references; bh=0m43xGW6BXpk/qb8IsoPeDoKEGsCgYKItknbb0ttfUM=; b=aQ6OUaoAeroSX4SLh6Fq6U7rJ4dnqznapEEuyT6dJSGbju6TNWOGgUSWZ89PSgigif RKCZUdkorB275cKQJZfzXMtADqJKlENesoPd5Z74SQg/wNAp3W7rkk+S/S48dqoAQb4f mCsQpaETNnlNJT8WvfCFQoSfpKCRw27X1liz9D5maQaqdD/BtAJxibeUbyF3VVjxxg7W yTrDwPVuQ9RC1rsv/5B2APID7VvsgT1jQo0Hj1HC4uc+LrCiBhEgXj/eDJA97OcVJCSI utwQqRyYTBTtQMnHQj9JUD+IQuOZXIBAaR/Ox057IwEGRuKySK6+aYfXKzlRqf3TaL7E R5Bw== X-Gm-Message-State: APjAAAXRGHjB8Wko96Cpg4LXmHW4ed4uTCtqDmwCuRjCQiEP2WjgvW1U YsZq/Cj9sL7+Cg3hQabcUJ3kSx8qjDQ= X-Google-Smtp-Source: APXvYqwyP3RUz6il0cUaKF7KjDPgSycUKlt6mEvnkklLpoKmv7HFztF7xMwR1940+ng5KIXTfzEQNg== X-Received: by 2002:a62:4e42:: with SMTP id c63mr53699598pfb.86.1582584171716; Mon, 24 Feb 2020 14:42:51 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id 133sm14320705pfy.14.2020.02.24.14.42.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Feb 2020 14:42:51 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Mon, 24 Feb 2020 14:42:32 -0800 Message-Id: <1582584158-16348-3-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> References: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH 3/9] compat: Remove genl_ops policy field for newer kernels X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" The policy field of the genl_ops structure has been removed in recent kernels. Signed-off-by: Greg Rose --- acinclude.m4 | 3 +++ datapath/conntrack.c | 8 ++++++++ datapath/datapath.c | 32 ++++++++++++++++++++++++++++++++ datapath/meter.c | 10 ++++++++++ 4 files changed, 53 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index cad76c7..a55c905 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1069,6 +1069,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ [OVS_DEFINE([HAVE_DST_OPS_CONFIRM_NEIGH])]) OVS_GREP_IFELSE([$KSRC/include/net/inet_frag.h], [fqdir], [OVS_DEFINE([HAVE_INET_FRAG_FQDIR])]) + OVS_FIND_FIELD_IFELSE([$KSRC/include/net/genetlink.h], [genl_ops], + [policy], + [OVS_DEFINE([HAVE_GENL_OPS_POLICY])]) if cmp -s datapath/linux/kcompat.h.new \ datapath/linux/kcompat.h >/dev/null 2>&1; then diff --git a/datapath/conntrack.c b/datapath/conntrack.c index 838cf63..25da2a5 100644 --- a/datapath/conntrack.c +++ b/datapath/conntrack.c @@ -134,10 +134,12 @@ struct ovs_ct_limit_info { struct nf_conncount_data *data; }; +#ifdef HAVE_GENL_OPS_POLICY static const struct nla_policy ct_limit_policy[OVS_CT_LIMIT_ATTR_MAX + 1] = { [OVS_CT_LIMIT_ATTR_ZONE_LIMIT] = { .type = NLA_NESTED, }, }; #endif +#endif static bool labels_nonzero(const struct ovs_key_ct_labels *labels); @@ -2312,7 +2314,9 @@ static struct genl_ops ct_limit_genl_ops[] = { #endif .flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN * privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = ct_limit_policy, +#endif .doit = ovs_ct_limit_cmd_set, }, { .cmd = OVS_CT_LIMIT_CMD_DEL, @@ -2321,7 +2325,9 @@ static struct genl_ops ct_limit_genl_ops[] = { #endif .flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN * privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = ct_limit_policy, +#endif .doit = ovs_ct_limit_cmd_del, }, { .cmd = OVS_CT_LIMIT_CMD_GET, @@ -2329,7 +2335,9 @@ static struct genl_ops ct_limit_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = 0, /* OK for unprivileged users. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = ct_limit_policy, +#endif .doit = ovs_ct_limit_cmd_get, }, }; diff --git a/datapath/datapath.c b/datapath/datapath.c index 853bfb5..55a835d 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -643,6 +643,7 @@ err: return err; } +#ifdef HAVE_GENL_OPS_POLICY static const struct nla_policy packet_policy[OVS_PACKET_ATTR_MAX + 1] = { [OVS_PACKET_ATTR_PACKET] = { .len = ETH_HLEN }, [OVS_PACKET_ATTR_KEY] = { .type = NLA_NESTED }, @@ -650,6 +651,7 @@ static const struct nla_policy packet_policy[OVS_PACKET_ATTR_MAX + 1] = { [OVS_PACKET_ATTR_PROBE] = { .type = NLA_FLAG }, [OVS_PACKET_ATTR_MRU] = { .type = NLA_U16 }, }; +#endif static struct genl_ops dp_packet_genl_ops[] = { { .cmd = OVS_PACKET_CMD_EXECUTE, @@ -657,7 +659,9 @@ static struct genl_ops dp_packet_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = packet_policy, +#endif .doit = ovs_packet_cmd_execute } }; @@ -1449,7 +1453,9 @@ static const struct genl_ops dp_flow_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = flow_policy, +#endif .doit = ovs_flow_cmd_new }, { .cmd = OVS_FLOW_CMD_DEL, @@ -1457,7 +1463,9 @@ static const struct genl_ops dp_flow_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = flow_policy, +#endif .doit = ovs_flow_cmd_del }, { .cmd = OVS_FLOW_CMD_GET, @@ -1465,7 +1473,9 @@ static const struct genl_ops dp_flow_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = 0, /* OK for unprivileged users. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = flow_policy, +#endif .doit = ovs_flow_cmd_get, .dumpit = ovs_flow_cmd_dump }, @@ -1474,7 +1484,9 @@ static const struct genl_ops dp_flow_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = flow_policy, +#endif .doit = ovs_flow_cmd_set, }, }; @@ -1841,11 +1853,13 @@ static int ovs_dp_cmd_dump(struct sk_buff *skb, struct netlink_callback *cb) return skb->len; } +#ifdef HAVE_GENL_OPS_POLICY static const struct nla_policy datapath_policy[OVS_DP_ATTR_MAX + 1] = { [OVS_DP_ATTR_NAME] = { .type = NLA_NUL_STRING, .len = IFNAMSIZ - 1 }, [OVS_DP_ATTR_UPCALL_PID] = { .type = NLA_U32 }, [OVS_DP_ATTR_USER_FEATURES] = { .type = NLA_U32 }, }; +#endif static const struct genl_ops dp_datapath_genl_ops[] = { { .cmd = OVS_DP_CMD_NEW, @@ -1853,7 +1867,9 @@ static const struct genl_ops dp_datapath_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = datapath_policy, +#endif .doit = ovs_dp_cmd_new }, { .cmd = OVS_DP_CMD_DEL, @@ -1861,7 +1877,9 @@ static const struct genl_ops dp_datapath_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = datapath_policy, +#endif .doit = ovs_dp_cmd_del }, { .cmd = OVS_DP_CMD_GET, @@ -1869,7 +1887,9 @@ static const struct genl_ops dp_datapath_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = 0, /* OK for unprivileged users. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = datapath_policy, +#endif .doit = ovs_dp_cmd_get, .dumpit = ovs_dp_cmd_dump }, @@ -1878,7 +1898,9 @@ static const struct genl_ops dp_datapath_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = datapath_policy, +#endif .doit = ovs_dp_cmd_set, }, }; @@ -2293,6 +2315,7 @@ out: return skb->len; } +#ifdef HAVE_GENL_OPS_POLICY static const struct nla_policy vport_policy[OVS_VPORT_ATTR_MAX + 1] = { [OVS_VPORT_ATTR_NAME] = { .type = NLA_NUL_STRING, .len = IFNAMSIZ - 1 }, [OVS_VPORT_ATTR_STATS] = { .len = sizeof(struct ovs_vport_stats) }, @@ -2303,6 +2326,7 @@ static const struct nla_policy vport_policy[OVS_VPORT_ATTR_MAX + 1] = { [OVS_VPORT_ATTR_IFINDEX] = { .type = NLA_U32 }, [OVS_VPORT_ATTR_NETNSID] = { .type = NLA_S32 }, }; +#endif static const struct genl_ops dp_vport_genl_ops[] = { { .cmd = OVS_VPORT_CMD_NEW, @@ -2310,7 +2334,9 @@ static const struct genl_ops dp_vport_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = vport_policy, +#endif .doit = ovs_vport_cmd_new }, { .cmd = OVS_VPORT_CMD_DEL, @@ -2318,7 +2344,9 @@ static const struct genl_ops dp_vport_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = vport_policy, +#endif .doit = ovs_vport_cmd_del }, { .cmd = OVS_VPORT_CMD_GET, @@ -2326,7 +2354,9 @@ static const struct genl_ops dp_vport_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = 0, /* OK for unprivileged users. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = vport_policy, +#endif .doit = ovs_vport_cmd_get, .dumpit = ovs_vport_cmd_dump }, @@ -2335,7 +2365,9 @@ static const struct genl_ops dp_vport_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = GENL_UNS_ADMIN_PERM, /* Requires CAP_NET_ADMIN privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = vport_policy, +#endif .doit = ovs_vport_cmd_set, }, }; diff --git a/datapath/meter.c b/datapath/meter.c index 7d8f51a..8478d80 100644 --- a/datapath/meter.c +++ b/datapath/meter.c @@ -26,6 +26,7 @@ #define METER_HASH_BUCKETS 1024 +#ifdef HAVE_GENL_OPS_POLICY static const struct nla_policy meter_policy[OVS_METER_ATTR_MAX + 1] = { [OVS_METER_ATTR_ID] = { .type = NLA_U32, }, [OVS_METER_ATTR_KBPS] = { .type = NLA_FLAG }, @@ -36,6 +37,7 @@ static const struct nla_policy meter_policy[OVS_METER_ATTR_MAX + 1] = { [OVS_METER_ATTR_MAX_METERS] = { .type = NLA_U32 }, [OVS_METER_ATTR_MAX_BANDS] = { .type = NLA_U32 }, }; +#endif static const struct nla_policy band_policy[OVS_BAND_ATTR_MAX + 1] = { [OVS_BAND_ATTR_TYPE] = { .type = NLA_U32, }, @@ -542,7 +544,9 @@ static struct genl_ops dp_meter_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = 0, /* OK for unprivileged users. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = meter_policy, +#endif .doit = ovs_meter_cmd_features }, { .cmd = OVS_METER_CMD_SET, @@ -552,7 +556,9 @@ static struct genl_ops dp_meter_genl_ops[] = { .flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN * privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = meter_policy, +#endif .doit = ovs_meter_cmd_set, }, { .cmd = OVS_METER_CMD_GET, @@ -560,7 +566,9 @@ static struct genl_ops dp_meter_genl_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, #endif .flags = 0, /* OK for unprivileged users. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = meter_policy, +#endif .doit = ovs_meter_cmd_get, }, { .cmd = OVS_METER_CMD_DEL, @@ -570,7 +578,9 @@ static struct genl_ops dp_meter_genl_ops[] = { .flags = GENL_ADMIN_PERM, /* Requires CAP_NET_ADMIN * privilege. */ +#ifdef HAVE_GENL_OPS_POLICY .policy = meter_policy, +#endif .doit = ovs_meter_cmd_del }, }; From patchwork Mon Feb 24 22:42:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1243657 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=hemlock.osuosl.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.a=rsa-sha256 header.s=20161025 header.b=L0X+Q/At; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RHC814f4z9sQx for ; Tue, 25 Feb 2020 09:42:59 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 38A74877F1; Mon, 24 Feb 2020 22:42:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0H-8OAfaPUHf; Mon, 24 Feb 2020 22:42:56 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 844198777B; Mon, 24 Feb 2020 22:42:56 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 79471C1D89; Mon, 24 Feb 2020 22:42:56 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 38249C0177 for ; Mon, 24 Feb 2020 22:42:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 27D1F8638E for ; Mon, 24 Feb 2020 22:42:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iW3sIQNZn1xa for ; Mon, 24 Feb 2020 22:42:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by fraxinus.osuosl.org (Postfix) with ESMTPS id B6BAA86055 for ; Mon, 24 Feb 2020 22:42:53 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id j7so4645353plt.1 for ; Mon, 24 Feb 2020 14:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jPJTeDm4jiGlrzCd+TuP0V4FVeqKlaC8qIb9NrNYZdM=; b=L0X+Q/Atm9VlS44I1YADim1IuUKPsUGO4neNNjE+gqvbdg5azJkzjfgEYGXAEl+9x0 zawtq1zv0+V0CmurTOrJ1dZDjUlT0ifUboiylj7i2WvQeZ/nT9NgTKeMrxV9Uz7SnFe5 DBY3/oOa68Ls15GYHGvmQxyLA1eE+3T6KDiQYRdPWqGpjSYh4EHir4OzwaxudLrUmoad yd8K/HS8++f4YVymo8po2Pd3Emexa8C9ro+65CrgYd3VddS4DW9tltEh14bPZZmqFj5A KEWupIBmWocFq7v7qMVEG45U/SvBXmTKKKLiHIj+vDGatbDLFAwKxdTNRYNW8Uo+eDlb sl2w== 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:in-reply-to :references; bh=jPJTeDm4jiGlrzCd+TuP0V4FVeqKlaC8qIb9NrNYZdM=; b=TTZilvARo6c0Vu3itYIStip4mZa9Z/yaPMFcuRnlqRkmKhy4Ip9klwj3fqSZC0ywxN +KXU893du/ADKdxkMy6W0oN4e/qnNXt+hdY9kNRzIzukCyBbQEGTzSWfuTdEwmwFO7cs UczAdi47LWVX5nhkbmZ+VKkVag3iljB1CRu7NPg04fyaEt4oMTA0wRpJNuM0h8k/W7Hh PINLTi98ahoVh+yY1W4LuBOD8cVbMEpdWA5kAXUw0A7wD9wQjke+hqgXxv8pRRE2ZpXW 4tLy65QU1cE6WFM916MGyxuXnDhbmtS275hSc2e8RhQSoESTKdUYLm6t0Nv3QtemHVHZ YVPA== X-Gm-Message-State: APjAAAWiwoRJ1DZ9hhLNXBbeYpDNYCjrNMaNpZMCfXJFJj5d6LXsxbKD cv4gOEwHxFAcea1BF/E9FJnyKnkD0og= X-Google-Smtp-Source: APXvYqwMUj6mZZE+CvZJG7TdOHHCi8ei9X2HeQ1alMobAV/ubu9orysi4+VIrqr9UG7w2ACvAqPK6w== X-Received: by 2002:a17:90b:94c:: with SMTP id dw12mr1472598pjb.13.1582584172885; Mon, 24 Feb 2020 14:42:52 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id 133sm14320705pfy.14.2020.02.24.14.42.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Feb 2020 14:42:52 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Mon, 24 Feb 2020 14:42:33 -0800 Message-Id: <1582584158-16348-4-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> References: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH 4/9] compat: Remove flex_array code X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Flex array support is removed since kernel 5.1. Convert to use kvmalloc_array instead. Signed-off-by: Greg Rose --- datapath/linux/compat/stt.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c index 21fef09..7b46d1a 100644 --- a/datapath/linux/compat/stt.c +++ b/datapath/linux/compat/stt.c @@ -13,7 +13,6 @@ #include #include -#include #include #include #include @@ -136,7 +135,7 @@ struct pkt_frag { }; struct stt_percpu { - struct flex_array *frag_hash; + struct pkt_frag *frag_hash; struct list_head frag_lru; unsigned int frag_mem_used; @@ -1079,8 +1078,7 @@ static struct pkt_frag *lookup_frag(struct net *net, int i; for (i = 0; i < FRAG_HASH_SEGS; i++) { - frag = flex_array_get(stt_percpu->frag_hash, - hash & (FRAG_HASH_ENTRIES - 1)); + frag = &stt_percpu->frag_hash[hash & (FRAG_HASH_ENTRIES - 1)]; if (frag->skbs && time_before(jiffies, frag->timestamp + FRAG_EXP_TIME) && @@ -1533,7 +1531,7 @@ static void clean_percpu(struct work_struct *work) for (j = 0; j < FRAG_HASH_ENTRIES; j++) { struct pkt_frag *frag; - frag = flex_array_get(stt_percpu->frag_hash, j); + frag = &stt_percpu->frag_hash[j]; if (!frag->skbs || time_before(jiffies, frag->timestamp + FRAG_EXP_TIME)) continue; @@ -1631,26 +1629,20 @@ static int stt_start(struct net *net) for_each_possible_cpu(i) { struct stt_percpu *stt_percpu = per_cpu_ptr(stt_percpu_data, i); - struct flex_array *frag_hash; + struct pkt_frag *frag_hash; spin_lock_init(&stt_percpu->lock); INIT_LIST_HEAD(&stt_percpu->frag_lru); get_random_bytes(&per_cpu(pkt_seq_counter, i), sizeof(u32)); - frag_hash = flex_array_alloc(sizeof(struct pkt_frag), - FRAG_HASH_ENTRIES, - GFP_KERNEL | __GFP_ZERO); + frag_hash = kvmalloc_array(sizeof(struct pkt_frag), + FRAG_HASH_ENTRIES, + GFP_KERNEL | __GFP_ZERO); if (!frag_hash) { err = -ENOMEM; goto free_percpu; } stt_percpu->frag_hash = frag_hash; - - err = flex_array_prealloc(stt_percpu->frag_hash, 0, - FRAG_HASH_ENTRIES, - GFP_KERNEL | __GFP_ZERO); - if (err) - goto free_percpu; } schedule_clean_percpu(); n_tunnels++; @@ -1691,7 +1683,7 @@ free_percpu: struct stt_percpu *stt_percpu = per_cpu_ptr(stt_percpu_data, i); if (stt_percpu->frag_hash) - flex_array_free(stt_percpu->frag_hash); + kvfree(stt_percpu->frag_hash); } free_percpu(stt_percpu_data); @@ -1718,11 +1710,11 @@ static void stt_cleanup(struct net *net) for (j = 0; j < FRAG_HASH_ENTRIES; j++) { struct pkt_frag *frag; - frag = flex_array_get(stt_percpu->frag_hash, j); + frag = &stt_percpu->frag_hash[j]; kfree_skb_list(frag->skbs); } - flex_array_free(stt_percpu->frag_hash); + kvfree(stt_percpu->frag_hash); } free_percpu(stt_percpu_data); From patchwork Mon Feb 24 22:42:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1243661 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=silver.osuosl.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.a=rsa-sha256 header.s=20161025 header.b=mjSZ962B; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RHCN1jZ5z9sRQ for ; Tue, 25 Feb 2020 09:43:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BEC262076B; Mon, 24 Feb 2020 22:43:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6motPWyeHrSJ; Mon, 24 Feb 2020 22:43:04 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 5446B20513; Mon, 24 Feb 2020 22:42:57 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3DED2C1D8A; Mon, 24 Feb 2020 22:42:57 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3D9AAC1D88 for ; Mon, 24 Feb 2020 22:42:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 326E187590 for ; Mon, 24 Feb 2020 22:42:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ux7IjgX4ybY6 for ; Mon, 24 Feb 2020 22:42:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by hemlock.osuosl.org (Postfix) with ESMTPS id CA63387702 for ; Mon, 24 Feb 2020 22:42:54 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id m13so390514pjb.2 for ; Mon, 24 Feb 2020 14:42:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TzMe3WcsApGN1GOPojD+W/bUJ1m7xh+Pwolazka1ErM=; b=mjSZ962BEbuFgZFCjxNvxe2/7fZRoEJfSsa4fVh3qsFwRW2X8DKSidAg7EF4gZeJn+ Ib4ZQpIdayQEhOcxL4oTTS9xHfwH08d1aZ0TB9CNnmrMpnsK6RKKGhe4d/48xqj0lRi/ ESz2Ovrps368ejFMTKUcyy+Wy8xgCvuM/uZirNPfxxhGe4G4TL/jpT5DXfG/hitIV1Xb PObE73RA3C5+/6EViVFDg3bUgw2jlMB4XyO4Oz0jr+gG7MPrlELBDftafyRN6ox2KBE2 3xTX5QFSbgWLaEGbmE3YCNMWgXv2JpcG7M4GbohYk/pKda1mwDar0JUAZa0cvn7nVa/4 oQ1g== 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:in-reply-to :references; bh=TzMe3WcsApGN1GOPojD+W/bUJ1m7xh+Pwolazka1ErM=; b=A/KVadNuX0eOduOjR0b+wTuEeDZDKJB/4rp2dnD8OYUejhc61qvU0X3zENvIMFWA/L KTIIRnSsbPW+sbaMWwAqZOHQkLQeeZEObpmvyy5oh0bLG5/41LGAsGDjNVxcvyWvTgaK sE6F1q4jvJjNG9BNw/GgUHaHXpbeA8I2P8cpiJk+E7d4MnPM7p3UkdDDg+KZ9Rf+bM2p LTGQR0pq0rwxL0jX1HqCc5qZml0JhqUKjyZ0Cn1PB8kYiYCKr3NJdT9IvuB780AyC9gs dGQRlmzE8rIrrgt7oDSX5Ve07NS46hr/aTwjQdqnab/SbPBD5V/P4LBPhq4M4XTgArIn bg+w== X-Gm-Message-State: APjAAAX79pFNJEmNILx6iYsWalTt5ialkxTaig3zQLQCSWOKlOh3ufNU nP6i+yI9LqcSmt5I+1hrFmC8ZPKMgK4= X-Google-Smtp-Source: APXvYqwbDhzj6Shycn0rA4ubtacswVTHmozA+BR5rQzrCmphtnibE7k4NPIDcJSEu67lcsmxhIFVzg== X-Received: by 2002:a17:90b:3d0:: with SMTP id go16mr1510851pjb.75.1582584174106; Mon, 24 Feb 2020 14:42:54 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id 133sm14320705pfy.14.2020.02.24.14.42.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Feb 2020 14:42:53 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Mon, 24 Feb 2020 14:42:34 -0800 Message-Id: <1582584158-16348-5-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> References: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH 5/9] datapath: Fix case statement fall through warning X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Add an explicit "Falls Through" comment to fix the warning. Signed-off-by: Greg Rose --- datapath/conntrack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/datapath/conntrack.c b/datapath/conntrack.c index 25da2a5..ad49daa 100644 --- a/datapath/conntrack.c +++ b/datapath/conntrack.c @@ -846,6 +846,7 @@ static int ovs_ct_nat_execute(struct sk_buff *skb, struct nf_conn *ct, } } /* Non-ICMP, fall thru to initialize if needed. */ + /* Falls through */ case IP_CT_NEW: /* Seen it before? This can happen for loopback, retrans, * or local packets. From patchwork Mon Feb 24 22:42:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1243660 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.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.a=rsa-sha256 header.s=20161025 header.b=DgE4fZKO; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RHCL043bz9sRQ for ; Tue, 25 Feb 2020 09:43:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 78E8E8699B; Mon, 24 Feb 2020 22:43:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id klMQ3olNyrob; Mon, 24 Feb 2020 22:43:02 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 4DA2E86657; Mon, 24 Feb 2020 22:42:58 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2F480C1D8A; Mon, 24 Feb 2020 22:42:58 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 24380C18DA for ; Mon, 24 Feb 2020 22:42:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0FE3787766 for ; Mon, 24 Feb 2020 22:42:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nBnVlLu4D45s for ; Mon, 24 Feb 2020 22:42:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by hemlock.osuosl.org (Postfix) with ESMTPS id B07C187765 for ; Mon, 24 Feb 2020 22:42:55 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id 7so3784840pgr.2 for ; Mon, 24 Feb 2020 14:42:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FcDWzeAnrxD+wy6hBB/J3Px3Pg6fmoqz4o8LTtRtGjE=; b=DgE4fZKOnFWXUPvpkQydWyAmXpFG/x35LepaNhTIgJE1ITjzRVLpEHqbYLwM74795i Jd86VtPkT7Kof60KZCuhtQQjSGdD2lgjYfgHFJ1A+6RMOOiksoNXDYHsRRkcAD8CCV1d O9NxvbdV/++OnPHq7L61dtNFLkYGVzVZqXATe+FDZt3aWGEnNxO2OLkKJPyvCkCvIcNU QdH/krFfczUHzQSXSIY/0XllZx46H965CJvO6NcUmuUBmbbbObIDY/l5qh0YrA+F0m+l f+edG6gdfbql6N9lYv/PsYly5DRU03QIA6ZABZMNafeLQ9Y+BqykwJRBKK8h5/VwF9SH KLWg== 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:in-reply-to :references; bh=FcDWzeAnrxD+wy6hBB/J3Px3Pg6fmoqz4o8LTtRtGjE=; b=jSuMCJl0BngiKLWr0PqwQNiSwgdE4SiKXb5a9nMZDojrn5groRCfT+itPGPfFyGCR/ yO/e8jidxZFbEC2Uj48aQlFFtWzfD7vo8l9Id6bOozp11VzEbdkv/eI4F9fZcCcWXURR QBoqQD9hfbj2ciyrEtcTMJQNueSt11p+9eDetcWug7OZ7DNuXS4ox+/bZezC80unjm8T yk8osMA3thXZDWD7y/T7FiCzostgfXaJmYFI8rS8Kzzm9b0lxSlS9ooNE6koPbA8PyFf yhodoYs/QUApCodOPtjNs7/GMIiSZ7Ja9SRd9dU6/enrWDf7JyDPUAP0kGSuQ14+ZgKZ XLXw== X-Gm-Message-State: APjAAAWr31q5BS8bmmsUemPLqcncWa2tN19a4DGQ2h7+wm5ZTRmg/onj r25wp2q2w1yKE2hr0HlgyRwcM4p6rak= X-Google-Smtp-Source: APXvYqxZfMlseEK0zpatSiSXiBoNms/4mOi4Raf31z9ctHho56ZFopO6TWjiLfKVwH6BYC8/XhOraA== X-Received: by 2002:aa7:84cd:: with SMTP id x13mr56012345pfn.130.1582584175043; Mon, 24 Feb 2020 14:42:55 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id 133sm14320705pfy.14.2020.02.24.14.42.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Feb 2020 14:42:54 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Mon, 24 Feb 2020 14:42:35 -0800 Message-Id: <1582584158-16348-6-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> References: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH 6/9] compat: Add FIELD_SIZEOF macro X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" The FIELD_SIZEOF macro is removed in Linux kernel release 5.5 but is still needed in our out of tree kernel module for compatibility with older kernels. Signed-off-by: Greg Rose --- datapath/linux/compat/include/linux/kernel.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/datapath/linux/compat/include/linux/kernel.h b/datapath/linux/compat/include/linux/kernel.h index 2e81abc..8529b1d 100644 --- a/datapath/linux/compat/include/linux/kernel.h +++ b/datapath/linux/compat/include/linux/kernel.h @@ -32,4 +32,8 @@ #define U32_MAX ((u32)~0U) #endif +#ifndef FIELD_SIZEOF +#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) +#endif + #endif /* linux/kernel.h */ From patchwork Mon Feb 24 22:42:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1243664 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=silver.osuosl.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.a=rsa-sha256 header.s=20161025 header.b=n3qXM6o8; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RHCX0nGRz9sRQ for ; Tue, 25 Feb 2020 09:43:20 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6D9D42076E; Mon, 24 Feb 2020 22:43:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cUL8s04ZkcTn; Mon, 24 Feb 2020 22:43:14 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 0F02122794; Mon, 24 Feb 2020 22:43:03 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E4049C1D88; Mon, 24 Feb 2020 22:43:02 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 17845C18DA for ; Mon, 24 Feb 2020 22:43:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E4B3087765 for ; Mon, 24 Feb 2020 22:42:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6JqSAlCtC60q for ; Mon, 24 Feb 2020 22:42:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by hemlock.osuosl.org (Postfix) with ESMTPS id F3AE3877B3 for ; Mon, 24 Feb 2020 22:42:56 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id b185so6092308pfb.7 for ; Mon, 24 Feb 2020 14:42:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=N5hHKH2VdhId+3K74Tn+wycsxWHpJ6v5GtfLFOVaAi8=; b=n3qXM6o8NvVY++DWfS2k44oWU9SKs7sFOJBzKJZG0Faf2JElXQLuXwSEzDYgTbV2u/ 3+DXexXe02CXz3IRc+btyiDa34ZMQfrnfA8Z/HCo5FqJSrriqHkvvQnxaz2TbNqqI1DK LNHtmPxGgSHILZW6u2ptf/hBh9LB6AkeLmEw6FbbKskuUFscwd8PNx2Akj/JeuSv8W1n iHzo5cpL23S8mnkvrB5hG1CepL9jUZr4s5UwEdGiy97OJnsV8ZLdyQ32VO+Tcm4HpPyu mrPB2bQxvskkvl7ZGU2r+N7y4fDTxiYY91Vg+yaDP9Y0obzk/HD0TKf4MX8Uq0XXAyaz Pwrw== 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:in-reply-to :references; bh=N5hHKH2VdhId+3K74Tn+wycsxWHpJ6v5GtfLFOVaAi8=; b=bKCqwR00vVchg36PNj6TJr2zZiZ9vt7Rw3VDFALj8tQ5xV6LaMTctlYK0DcWo+ozzD paypgZb2d00WZO8LjsouezQqADMlTI/P5r1k/Au1XOpJWRvJEcdNWHN7spHfGZ8U4Woe pr4F7lk9yX4Wv2itbZuDEsaXmJWlBu8hgBi+UIutROs/yfj7uB3PqQIfANMSRdUxD9e9 xtdGMUsonF+DS/zZP99hhMPQYo17qMYV85XLgPRyGY/tPfoJO8nru/po5CkDhijXFmmF aMX80kWj+Hw0yNblpgEKNWwQYmQMVSJbk+94S84iskP+WEuZYgB4FZOwf5JkWc907UR2 qhCQ== X-Gm-Message-State: APjAAAVSz32DvV4As1dnC46O0xQOZR++SYG0JinrZiYl3KNSGl2ERTQX U/kRtIhiC2Uzjk/U3BLls5yaZJ9bLis= X-Google-Smtp-Source: APXvYqy290nfBBdtiDRpwMoiaFIGwQLZGrt54XIgcWrq2vuh2vKwwn+bfgZdyjVUUkf9PlPFOZ1YSw== X-Received: by 2002:a63:7e56:: with SMTP id o22mr29857455pgn.136.1582584176134; Mon, 24 Feb 2020 14:42:56 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id 133sm14320705pfy.14.2020.02.24.14.42.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Feb 2020 14:42:55 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Mon, 24 Feb 2020 14:42:36 -0800 Message-Id: <1582584158-16348-7-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> References: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> Cc: David Ahern Subject: [ovs-dev] [PATCH 7/9] datapath: Kbuild: Add kcompat.h header to front of NOSTDINC X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Since this commit in the Linux upstream kernel: 'commit 9b9a3f20cbe0 ("kbuild: split final module linking out into Makefile.modfinal")' The openvswitch kernel module fails to build against the upstream Linux kernel. The cause of the build failure is that the include of the KBUILD_EXTMOD variable was dropped in Makefile.modfinal when it was split out from Makefile.modpost. Our Kbuild was setting the ccflags-y variable to include our kcompat.h header as the first header file. The Linux kernel maintainer has said that it is incorrect to rely on the ccflags-y variable for the modfinal phase of the build so that is why KBUILD_EXTMOD is not included. We fix this by breaking a different Linux kernel make rule. We add '-include $(builddir)/kcompat.h' to the front of the NOSTDINC variable setting in our Kbuild makefile. As noted already in the comment for the NOSTDINC setting: \# These include directories have to go before -I$(KSRC)/include. \# NOSTDINC_FLAGS just happens to be a variable that goes in the \# right place, even though it's conceptually incorrect. So we continue the misuse of the NOSTDINC variable to fix this issue as well. The assumption of the Linux kernel maintainers is that any local, out-of-tree build include files can be added to the end of the command line. In our case that is wrong of course, but there is nothing we can do about it that I know of other than using some utility like unifdef to strip out offending chunks of our compatibility layer code before invocation of Makefile.modfinal. That is a big change that would take a lot of work to implement. We could ask the Linux kernel maintainers to provide some way for out-of-tree kernel modules to include their own header files first in a proper manner. I consider that to be a very low probability of success but something we could ask about. For now we cheat and take the easy way out. Reported-by: David Ahern Signed-off-by: Greg Rose --- datapath/linux/Kbuild.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datapath/linux/Kbuild.in b/datapath/linux/Kbuild.in index 9e3259f..395b0cb 100644 --- a/datapath/linux/Kbuild.in +++ b/datapath/linux/Kbuild.in @@ -16,7 +16,7 @@ ccflags-y += -include $(builddir)/kcompat.h # These include directories have to go before -I$(KSRC)/include. # NOSTDINC_FLAGS just happens to be a variable that goes in the # right place, even though it's conceptually incorrect. -NOSTDINC_FLAGS += -I$(top_srcdir)/include -I$(srcdir)/compat -I$(srcdir)/compat/include +NOSTDINC_FLAGS += -include $(builddir)/kcompat.h -I$(top_srcdir)/include -I$(srcdir)/compat -I$(srcdir)/compat/include obj-m := $(subst _,-,$(patsubst %,%.o,$(build_modules))) From patchwork Mon Feb 24 22:42:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1243663 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.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.a=rsa-sha256 header.s=20161025 header.b=fnVU1Qvk; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RHCW1pnnz9sRJ for ; Tue, 25 Feb 2020 09:43:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AE02286A7C; Mon, 24 Feb 2020 22:43:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AHw53bw6Q1gI; Mon, 24 Feb 2020 22:43:12 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id BBCE28676A; Mon, 24 Feb 2020 22:43:00 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A4FC7C1D88; Mon, 24 Feb 2020 22:43:00 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1072FC18DA for ; Mon, 24 Feb 2020 22:42:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0BB5386448 for ; Mon, 24 Feb 2020 22:42:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xwbU8-4AsSJs for ; Mon, 24 Feb 2020 22:42:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by fraxinus.osuosl.org (Postfix) with ESMTPS id DF8288638E for ; Mon, 24 Feb 2020 22:42:57 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id d6so5873057pgn.5 for ; Mon, 24 Feb 2020 14:42:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hHJmbxRgl6m9agm629dEfDEYobAVy/FLrmudd12QtDo=; b=fnVU1Qvkk3y5YhFCo7mncRBmDb3AmM3Q2nFDoboovBYYUs0ZUuIkU9sDftZCwrmwwZ mNpXyztBZIPEaM6MdFbBbvp8cGXbBRDRBlFH3O6HcoszUUibFKXYtt1NrWqzG/0q24dg foPabDfPSqq6+wC7cB9dlsXtI0xe7Y5by6wfWK5tj5kkYhI7KaWQWLCqsK/0swsP2d8c HrWAPxSM/OFcqm7E2hUA87cOyXMmX9vGIyj+Hqr8B8NTP4lQFzLQrpwXSZKsPflN152m ZOAHGur6Qkol0QV600WZ2k4/eRj77PaWhxb5XJ3CqZHbMgy5b4L7zOORLg3Tz4hCPgkv Vy2Q== 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:in-reply-to :references; bh=hHJmbxRgl6m9agm629dEfDEYobAVy/FLrmudd12QtDo=; b=NdoRm/0wcLM1c18hTrlIvk2MnHOvQ+4wEa97MVbbS9kpJ4Fr46MdaIbA9ArelWQZ8a xJxxVSywouauEaMlvkhf+lZzfbXRqNRnAqKu5MqautgwdAAHDrIa4+PZ5B5FWM45dTtF QrmDo31O9hdqCk2QLWwrJvjAU1Jh8Bv6P/Sy3r1TUHAw990Tw5mPNiGZzx5OpOsfMeJI S3uf1KXNA73TFI7W6dYbdWkR8T/VUY1ZbvMSEMhW89aD7Mid/uZ7vyi5DGk7n5JI80sD i6kDP5WMo6gRsXOoxipzwJLaJsZd7TbhdtDBeU/MR+y9SMvINOHbSDDKZGNbmjRpVgWw ibxw== X-Gm-Message-State: APjAAAV8Hb2q8z4Qy4QVXvcBCzQWoRbmqCmW5FSwLbvMJRMdamJ2abRJ DrQqIJfQr7AVpyagl1Of6sJxyLzeCFI= X-Google-Smtp-Source: APXvYqzVsfhP5GtpBz1o2RuBsBTyDz8b/R754Oz/UZdWIZJrdp4+OH8SATwYTzrZf9TdGlk4bB1lFQ== X-Received: by 2002:a63:6dc1:: with SMTP id i184mr53378680pgc.321.1582584177161; Mon, 24 Feb 2020 14:42:57 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id 133sm14320705pfy.14.2020.02.24.14.42.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Feb 2020 14:42:56 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Mon, 24 Feb 2020 14:42:37 -0800 Message-Id: <1582584158-16348-8-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> References: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH 8/9] Travis: Update kernel test list X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" We are adding support for Linux kernels up to 5.5 so update the Travis test list. Signed-off-by: Greg Rose --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index abd2a91..ef9f867 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,7 @@ env: - TESTSUITE=1 OPTS="--enable-shared" - TESTSUITE=1 DPDK=1 - TESTSUITE=1 LIBS=-ljemalloc - - KERNEL_LIST="5.0 4.20 4.19 4.18 4.17 4.16" + - KERNEL_LIST="5.5 4.20 4.19 4.18 4.17 4.16" - KERNEL_LIST="4.15 4.14 4.9 4.4 3.19 3.16" - AFXDP=1 KERNEL=5.3 - M32=1 OPTS="--disable-ssl" From patchwork Mon Feb 24 22:42:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1243669 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.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.a=rsa-sha256 header.s=20161025 header.b=TmuQHug8; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RHD36RQGz9sPR for ; Tue, 25 Feb 2020 09:43:47 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5E4CC86569; Mon, 24 Feb 2020 22:43:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YWlz8FD2LFMb; Mon, 24 Feb 2020 22:43:43 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id BC342869BF; Mon, 24 Feb 2020 22:43:13 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id AF5ABC1D93; Mon, 24 Feb 2020 22:43:13 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 76555C1D89 for ; Mon, 24 Feb 2020 22:43:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5FC13866F0 for ; Mon, 24 Feb 2020 22:43:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V3yu3hMIu2pW for ; Mon, 24 Feb 2020 22:43:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by whitealder.osuosl.org (Postfix) with ESMTPS id E59A686717 for ; Mon, 24 Feb 2020 22:42:58 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id a14so5475144pgb.11 for ; Mon, 24 Feb 2020 14:42:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3dxl1lYeSh+jSGr+jJqrcrjQCXvXM0CpERWQo+w0EYQ=; b=TmuQHug8la9zOYvazi6AIVH6lcymkrc2hmVUG+XFFQxBZxbG1/TosD7290mQ1FJJVI ZRSHO5cs2XMtJ8oj5xIQAGG2JiG2oQZ005ohqyjSiaMvrAru+JuaaH8VzW0HWKM9sdOB oWmKJVFuJ0MnLuRpYqTDGE7BQ74e3Uda+pXH27yzeqj5imQA3I8yt4ZCRxYcxSACmjq6 BGrihnquHoTGTpdd3wuqmWGGHnDc+j3qp77u6T0g1XjJWy9snfV1wBKx0MX550lcje2H vCPo/jbjwQtP8Af+g/X5l1obsvZLDYR4z8MysqpB5eOM3Uo7796VnDnBUAgnhSzt+UC7 gvog== 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:in-reply-to :references; bh=3dxl1lYeSh+jSGr+jJqrcrjQCXvXM0CpERWQo+w0EYQ=; b=gbf+pDjRxjKbPl9SaaFUTpKWlgCZ8FieEfTwO+yZXJ9BAyTd9kvOsoR9iC1I6sQBvk AnRe4c9+u+nZXwsyN05bsLaxvqdYz7FylpnsTb2Y6tY+1sd2ZXTZo8vLwGR1fHEJ3vCV E4QJ7WbKsxYzL8ldzAdpaVUTWUgzgM+utM9Y5nscZqPl6dDDF+P5lE3yrSHUcsgCHhqz Rj1dhZTTg5km57+OLiO5P+ppKY76iPMzwzvquoXVlJMMQal2e31Eg/NLOfW+n6YHQ5f/ 6kIv0SiZ+p7hO5Dx20YcKRfYrEcfopGCU8kmfC22Cb1K4prADs2vnPaBlAa4nZ50lSEz CmGg== X-Gm-Message-State: APjAAAUjsxY4Kyth9/suhLfbTFE2ebRQ0cy+wZcgsSmlspjtbj6xMBoU TYGpVRURj1bYusY1ft8K5kP6sUj/DeY= X-Google-Smtp-Source: APXvYqy2V+xr/hSRg6f/TA0sp5i/D/DBjkf5vm8ewCT9gjfXVwi0vSXEP4EMAPt7XFIJLIaO298YaQ== X-Received: by 2002:a63:da45:: with SMTP id l5mr13195248pgj.273.1582584178160; Mon, 24 Feb 2020 14:42:58 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id 133sm14320705pfy.14.2020.02.24.14.42.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Feb 2020 14:42:57 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Mon, 24 Feb 2020 14:42:38 -0800 Message-Id: <1582584158-16348-9-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> References: <1582584158-16348-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH 9/9] compat: Use nla_parse deprecated functions X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Changes for in kernel generated netlink attribute parsing functions require our out of tree driver to use the deprecated forms of those functions. Otherwise the message parsing will return -EINVAL because NLA_F_NESTED is not set in the nla_type field. Signed-off-by: Greg Rose --- acinclude.m4 | 3 +++ datapath/linux/compat/include/net/netlink.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index a55c905..43d1576 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1072,6 +1072,9 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_FIND_FIELD_IFELSE([$KSRC/include/net/genetlink.h], [genl_ops], [policy], [OVS_DEFINE([HAVE_GENL_OPS_POLICY])]) + OVS_GREP_IFELSE([$KSRC/include/net/netlink.h], + [nla_parse_deprecated_strict], + [OVS_DEFINE([HAVE_NLA_PARSE_DEPRECATED_STRICT])]) if cmp -s datapath/linux/kcompat.h.new \ datapath/linux/kcompat.h >/dev/null 2>&1; then diff --git a/datapath/linux/compat/include/net/netlink.h b/datapath/linux/compat/include/net/netlink.h index 34fc346..7c0d993 100644 --- a/datapath/linux/compat/include/net/netlink.h +++ b/datapath/linux/compat/include/net/netlink.h @@ -143,6 +143,10 @@ static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value, #endif +#ifdef HAVE_NLA_PARSE_DEPRECATED_STRICT +#define nla_parse_nested nla_parse_nested_deprecated +#define nla_parse nla_parse_deprecated_strict +#else #ifndef HAVE_NETLINK_EXT_ACK struct netlink_ext_ack; @@ -164,6 +168,7 @@ static inline int rpl_nla_parse(struct nlattr **tb, int maxtype, } #define nla_parse rpl_nla_parse #endif +#endif /* HAVE_NLA_PARSE_DEPRECATED_STRICT */ #ifndef HAVE_NLA_NEST_START_NOFLAG static inline struct nlattr *rpl_nla_nest_start_noflag(struct sk_buff *skb,