From patchwork Wed Feb 26 17:41:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1245225 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=QK7PTT0o; 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 48SNQM2T9dz9sNg for ; Thu, 27 Feb 2020 04:41:30 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 026A3875D9; Wed, 26 Feb 2020 17:41:29 +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 znTIpLIXFk6Y; Wed, 26 Feb 2020 17:41:28 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 4E97486E6A; Wed, 26 Feb 2020 17:41:28 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 365C2C1D87; Wed, 26 Feb 2020 17:41:28 +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 B2ADBC0177 for ; Wed, 26 Feb 2020 17:41:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AFCD186F87 for ; Wed, 26 Feb 2020 17:41:27 +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 8SlKk4gRHeJL for ; Wed, 26 Feb 2020 17:41:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5201886E6A for ; Wed, 26 Feb 2020 17:41:27 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id k29so111388pfp.13 for ; Wed, 26 Feb 2020 09:41:27 -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=6JtHQeXocv4w69S1es14QqgG5pGsqcM9CQ/YG0dISwo=; b=QK7PTT0olg61iprgXQokI0ZApwnEtMk5L1BFil7EdZ4/vj8tPzqF4aS6znpd9vqf4H L0SapQDRimem2b9Oeh/n6uOcGuXK0Gtn8AoOVyQpyWT9EfHFxXs6cTYFXeLL1hPLtg2b 20PhM5ynILiGmaGRiHySifIZISBPVNGDJbtgF3vFyM3BBGPjTorLYZk9DDxKzd/3OSus s75Qt0gU6G9adAgeUC/GEZ0eCpCRK6ugbTzIK3aVv5eaNNRjNPfsAf7aAeiDiOcR+qBJ ZP00pD6zA+NVJb6f1se3cVmrjEiGt9g3i2aYD9sp5fRFU4RrZ10TnCn7tw6w8eaktkVK lhzA== 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=6JtHQeXocv4w69S1es14QqgG5pGsqcM9CQ/YG0dISwo=; b=d5q5J+ib9cDz1qwIHhk/AGol9Ok7e0C/NqKK2k/ihyKJQYqxMVLgmQS5tzUtIWoJBf EwRD07TqGhX2svRLd/TwQe05LlZ/wijS9bXZ28bYxvj9lS3RzmB6i/9pyayyr77N54/V IBEpM7LtmUe/TNgNcKMTyP4shiNVX2H/deMvZOl9P7ZjpIsE+UPGamTGRKkhiw5B1LM5 x/SNAJjQ0YHCgITe8NofCCLI3RvWsJuD4oT0YN3e2WK2I0eUQZHY1ZAfRyHG+jYRk2+Z pUHUGp8CEb+YQglp8P9SZl9zaONkI5JXx+KkEtvRqtxfFWZwuOARW82PwYSw88Y0CT13 QbKw== X-Gm-Message-State: APjAAAVuWFWJneNL47XW/9kasnYp5X6CdFPKuRJbDpo1Tp/vyd5aYz9P PleBi0O9tLSoKzawzYz0CgkoAnxJV1M= X-Google-Smtp-Source: APXvYqxlRG05PEJaL0lBqFmqfqrhF0SJtrrM+sXXBrQDrPNL//cEpPh5zAONQaVyCZNL4DDH8i8rXQ== X-Received: by 2002:aa7:9e0b:: with SMTP id y11mr5757112pfq.182.1582738886670; Wed, 26 Feb 2020 09:41:26 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id k67sm3463133pga.91.2020.02.26.09.41.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 09:41:26 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 26 Feb 2020 09:41:12 -0800 Message-Id: <1582738882-15842-2-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> References: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH V2 01/11] 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 Wed Feb 26 17:41:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1245228 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=KGtFcF2u; 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 48SNQZ3Ywqz9sNg for ; Thu, 27 Feb 2020 04:41:42 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A62A1878BC; Wed, 26 Feb 2020 17:41:40 +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 heSoAqTEHeJN; Wed, 26 Feb 2020 17:41:35 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 177FB877DF; Wed, 26 Feb 2020 17:41:32 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id EAA04C1D91; Wed, 26 Feb 2020 17:41:31 +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 EF189C08A0 for ; Wed, 26 Feb 2020 17:41:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E0168862FC for ; Wed, 26 Feb 2020 17:41:28 +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 1rMFkmRNxIRX for ; Wed, 26 Feb 2020 17:41:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 7247A861C7 for ; Wed, 26 Feb 2020 17:41:28 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id p11so1553245plq.10 for ; Wed, 26 Feb 2020 09:41:28 -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=KGtFcF2uRt59bKtnPXzqoqSAgt2Uh31X5IZ2lA/yqahx1NPWoBKIwacX/B/Iz4vrV7 nnltRZWxl93Ru486haTzZ8fyI8uj/Sky2DnfGC0jGr/mLM2HjVs6uA5l8f/xkpYptwsN BHfcC7l89fUDIDLlrhhEOOvfFTzAS623GTuldzO5nCglot6+ukiFGvKcGierrI1RsvQu hQcyiUOdxU8lasJ1Kcyuknhw4hxpqzcUSGomrpSrSnBgIkn1wrjfgE48G5HbvCFFHCL/ 44IskcYs4e7aBLYhbwX+OzfIA6+Hp2O4GL4MaVguDi53/NAR/4EelGPC4EVFTuaTKDMU qkTw== 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=Ebz5wcGBEeGmw8hdzjn2re/Fw1kB4U6EqoIpYbi1HnbaGAwWv0QvXIMzM1ZwxDDapC fIFr7U1DT7VlooPeVniz+Z+/cstCf23fUEd+004dBzyYbPekAr4DFP002KBMJoRSnZht pcf59yQ+CDtoufYLQlUIbE31q1+szHxsJ9nUFZzfx0C+b45UgWHIKUrfhAotfsJak+K8 cetNpN3x8oG8uMbVYQXewcFRkrU4WOvzI5WV2NjMQxoKyF73nXOyKAK8ZAqZI3Sg3wkR lli/98dRxJgNT7jOLsD05DhsHj00jO18YCgcb0yNjnG5Vd/21W50Vp7hlcTalmrvjXyn iF/A== X-Gm-Message-State: APjAAAVDW9lVXdBBMVnBny8jhFhxTIHlGgyvqL0oZ3nFrvSYVswqzm/R jyK5wgwsic4Oc8dJkhIkhhg2eos9ugk= X-Google-Smtp-Source: APXvYqwUl+75zCB/6+Vl+1qi7n4hYim0tcXbuN2Uj6cJ80URdXNFbSVMOQp1WCZoFr6Cx9yZOzvqHg== X-Received: by 2002:a17:90b:3c9:: with SMTP id go9mr214298pjb.7.1582738887721; Wed, 26 Feb 2020 09:41:27 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id k67sm3463133pga.91.2020.02.26.09.41.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 09:41:27 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 26 Feb 2020 09:41:13 -0800 Message-Id: <1582738882-15842-3-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> References: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH V2 02/11] 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 Wed Feb 26 17:41:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1245227 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=OFeKJHAG; 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 48SNQR5zQqz9sPK for ; Thu, 27 Feb 2020 04:41:35 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 597B785C8F; Wed, 26 Feb 2020 17:41:34 +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 vNQmBFnkiNV7; Wed, 26 Feb 2020 17:41:32 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id D306887364; Wed, 26 Feb 2020 17:41:32 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id AB324C1D8F; Wed, 26 Feb 2020 17:41:32 +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 38D45C0177 for ; Wed, 26 Feb 2020 17:41:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1A6A0820B2 for ; Wed, 26 Feb 2020 17:41:31 +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 xVh4gL9TwXw9 for ; Wed, 26 Feb 2020 17:41:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by hemlock.osuosl.org (Postfix) with ESMTPS id 1615C81C80 for ; Wed, 26 Feb 2020 17:41:30 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id s1so120005pfh.10 for ; Wed, 26 Feb 2020 09:41:30 -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=OFeKJHAG0XBql12DkIfwpOYThTIfQssEHUepLrNxww7y61Y/agR+P8p3kIWgKru0YN Ewdg+RMAmrpK528eq5nJVKVG7ThTn1mJLVUpTW4lGEkujVU6VkK5jHNbNt1Ziefk+3u3 P4PFHQT4pfHS68rpNcugTM1B/CBNw/M9HlBYDMdYCDpDbbN88/IsDAUiNlhM2gdCgT9a u/n7pHTAHOYV0/GU/ytpwuNVNfNkbI9OdJRfoyUkOJ4S2IofqodFc/tkQpbkIT9u3hOX BqyKBnNlnudBqVe/30/svSZRcOMnUW56+M7a5y6uY3VqT7ra3R90n7a+6iSsY8K6Tzjy 9kUA== 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=XeIUzPrsM/xZhZwMzQBIV5qlEBBfG3EcanmwnjWglUvl8xH1rcGyik1jmxrlqInOSf SHirNKmtUxxDIKuPmObh7gJDovBshVH6+PDzdwTocM9H1MFMflG4HDnpv3Pm5MQ4iOg4 RAYrhnw1EiDlY/vhqMN3redTMH8FgBDp1lT8D+yKqNeszi568lvVXKb3d+60zMWIGPnk 8+yyxwAw/mNf5B5Y0GQDDX8aFVHM6GsIQ5LBrmfB7Zjt3wDDzqZF8Up3vzTIkNE/ZWLP jPKBwO0sg079KnfX+wAZk0SuY5ywwam5DKcLuMv9fXcn3f4BwVzP91R2iSupBBxiau7+ dzRw== X-Gm-Message-State: APjAAAWcsX0YzMGyM2MK7baVdp5EJ0f7f0oP3dGLkoJKoZLd+VDNoVno PL7Nhs4IMTwLKVO8KBP15AJUxDNsFBg= X-Google-Smtp-Source: APXvYqxc3RPv5wN2DdKa7I5YnvtS+cbfJQjpj7CCI7xY6tfABt8tjHj2jQlqfnRDmX9ZqIzXaDCk4g== X-Received: by 2002:a62:e91a:: with SMTP id j26mr5586528pfh.189.1582738888991; Wed, 26 Feb 2020 09:41:28 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id k67sm3463133pga.91.2020.02.26.09.41.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 09:41:28 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 26 Feb 2020 09:41:14 -0800 Message-Id: <1582738882-15842-4-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> References: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH V2 03/11] 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 Wed Feb 26 17:41:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1245229 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=NWwJdHkP; 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 48SNQc1XmWz9sPK for ; Thu, 27 Feb 2020 04:41:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6828D22FEE; Wed, 26 Feb 2020 17:41:42 +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 WHnV5R7xvALQ; Wed, 26 Feb 2020 17:41:38 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id D40D922B25; Wed, 26 Feb 2020 17:41:33 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8C6FBC1D91; Wed, 26 Feb 2020 17:41:33 +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 5E286C08A0 for ; Wed, 26 Feb 2020 17:41:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5303C87776 for ; Wed, 26 Feb 2020 17:41:31 +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 tH4Sg7Jolz4A for ; Wed, 26 Feb 2020 17:41:30 +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 whitealder.osuosl.org (Postfix) with ESMTPS id C6FFE87781 for ; Wed, 26 Feb 2020 17:41:30 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id h8so9700pgs.9 for ; Wed, 26 Feb 2020 09:41:30 -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=NWwJdHkPknuoW5BeVmOyjyxBA9SGawTJ07i+u4+qmhOixkvZ4mVyey23KaEZozDVPz we8hGjPysNBCCUNm1Rk1dNXcAoo68VLgKzuN93yTjoPOIPFY7u6xsM5GlzfHKZWoeSj2 10rI+ddL9CyINlyjeu3wMGe8bF/d+WcwzhIY3G6Wpww17D/5qyigZATCP7HWUD7Pkwmu Z4UqVVM7jyrNY9z9hch2FPmppADoia9dWhHAVNr4ugsFBOyexX2GlpwqHk4ltCBx3MHm E9wSTEL7Cm5n+qReG84wIGFs7DO9pg35gzyfrfcI/6n4UXlwnPP+YE0FPkLvBn7bSJAJ +Wxw== 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=IM90kpOa93w/npttuwGsxi2Lcp5f9780G4AEtK0rX9WQ+Q6/QQszNAAzjUv0FPFRuW Gz10oEwuAiH6imiUAUJuw3w/LVO+3dlFUSgrPDYFMjfdfAl0vsaOJirKQdmRWvJY4gIt jlCrGzR4b4tQkPseHgYroPPrdT6RR7un7CVt/yxTbdFew51hiz3mOIL4YPPNsFeUzyJG 4ORx6wtT+jXAqQncICKDgFTWie2k5nGfUzuLjK7e0eLKuQX+GFiIROyGhFIxq+upqsmw 0fRnA+BAidIsLHqOGLUKE0Axcz/b1Yu7oQCBoeCXd2K2OjQOKbQjDY495vR0Wlast5z5 wWdw== X-Gm-Message-State: APjAAAUNcolm8MpYIZdqlYm7JMikLJOy+MOF1utfaom2yiLU4SbzfsiW /GuZxyQMeSow6W3jAu4YEz+hW7Cqnvg= X-Google-Smtp-Source: APXvYqwcQXSK8zK/aWp9ugPimsY1V4jf91wQUktgUeqKjIYQf6bUyOL9PCoEjeqR0Hnhwko2naivOA== X-Received: by 2002:a62:7a8a:: with SMTP id v132mr5682268pfc.111.1582738890018; Wed, 26 Feb 2020 09:41:30 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id k67sm3463133pga.91.2020.02.26.09.41.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 09:41:29 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 26 Feb 2020 09:41:15 -0800 Message-Id: <1582738882-15842-5-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> References: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH V2 04/11] 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 Acked-by: Yi-Hung Wei --- 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 Wed Feb 26 17:41:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1245231 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=CJfpXfym; 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 48SNQt5C2vz9sNg for ; Thu, 27 Feb 2020 04:41:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2FAED87A47; Wed, 26 Feb 2020 17:41:57 +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 Nh6xX0unqdlO; Wed, 26 Feb 2020 17:41:51 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id C17EC8788C; Wed, 26 Feb 2020 17:41:35 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A32CBC08A0; Wed, 26 Feb 2020 17:41:35 +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 23C5AC1D87 for ; Wed, 26 Feb 2020 17:41:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0D19183DD9 for ; Wed, 26 Feb 2020 17:41:32 +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 p0J5ehMR4C2W for ; Wed, 26 Feb 2020 17:41:31 +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 AF32184D8E for ; Wed, 26 Feb 2020 17:41:31 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id p14so136954pfn.4 for ; Wed, 26 Feb 2020 09:41:31 -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=CJfpXfymC7pghfnUl5JMdWFHra+eHXTK9zPO5JK0FiFYuHd5v0PhzQfv+TD6Ay7I71 ITIX7zhT6elK+5P1IQGREB5OcVzASMg/6CAvYheTJxCpFmRRr6Qri4aWjJ+cs+mNAWfl reO0UtMglOkocz1Egwk/NJRRAKLVph9ocHrFA3fRwyQ+hqxhhZwZ95h7VeEIOINuywc6 ESnF7K24w8MusOqVeCwMdEdizdm/7TdVPSrhU4Cx+FhqWKyPgGDFdxsoq7GPuslU7B7G u33D4IP4maw3AwsE3qtvQxYIwI8018HoSMyypzVwyNxKvRl9A//LId26Q9larOcDC2Nd SHEQ== 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=UBz44GsJMXTtA7wHEZ3Rge3B3qj0Lu/aWii3TFNLiSlzHG9sjuCP4HLyvS9Okit0Lr SzeV0/7OzCJgqVJnEZuanhAuOq7s9zXSO1N+Pon7h7Du8lNPC9VKKI2uGHwfkSe/ZTZX 6X1UEUwSeqxbwW1PmRmnVCYfgTTYfViFx6KypY2Zar4JTnRcRWi2u4U3N6EEg4CuXuSR WHWWEaowGBRNQ++kSaY1+cmWymwfSX8CYviw/HBu7Gxb5W+Ekzlb5zAeq+Lo2uYtmNth SNF0Y1RAoPfnihMralMhgNTtP0+izZTLXeU6JGVDDP43rrP5zphz4i+nSE/1EYXczO3k 2J0Q== X-Gm-Message-State: APjAAAUxkFiVDIeZjLaEqFMtZlcQJngDaWg/k9Y4djNU1Yrh3XTZF7oy Hj6blJLR+btN7NvgLM64dhzOnRdcDE8= X-Google-Smtp-Source: APXvYqxr0nsSn8UVDintC0P6LULV1q7Yt9tlZsFkUs2+Xwhs/+wTrczW3AidSaaA/ZyYbKXB6Gq+VQ== X-Received: by 2002:a05:6a00:45:: with SMTP id i5mr5393561pfk.252.1582738891063; Wed, 26 Feb 2020 09:41:31 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id k67sm3463133pga.91.2020.02.26.09.41.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 09:41:30 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 26 Feb 2020 09:41:16 -0800 Message-Id: <1582738882-15842-6-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> References: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH V2 05/11] 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 Wed Feb 26 17:41:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1245234 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=ERQDfVbr; 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 48SNR60m8vz9sPK for ; Thu, 27 Feb 2020 04:42:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1C40E87C11; Wed, 26 Feb 2020 17:42:08 +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 jwxjaXlv1P-X; Wed, 26 Feb 2020 17:42:04 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id E61AE87CB8; Wed, 26 Feb 2020 17:41:58 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B7AD9C1DCE; Wed, 26 Feb 2020 17:41:58 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id D17B2C1DCB for ; Wed, 26 Feb 2020 17:41:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B856D231AB for ; Wed, 26 Feb 2020 17:41:56 +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 JUnobFBOj4PM for ; Wed, 26 Feb 2020 17:41:54 +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 silver.osuosl.org (Postfix) with ESMTPS id 1E5FD22EDD for ; Wed, 26 Feb 2020 17:41:40 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id b185so127527pfb.7 for ; Wed, 26 Feb 2020 09:41:40 -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=ERQDfVbrXW8YIqUL+V5ruZKOwm5a3paf/8V6SWBhJBdwCholFmbPDFS9iBaLfv279G MBGmTbHCSx582xQAkwK/KkHcQGFIgNeu7MRIxhZkvU0fHyiKufgVYoKnbOIL/PWiTmBV tUnM5y8FRXK1sdfpzpb5eiw/l3xNLXqDjB9m/C5cs9kl/ah+MaJLCR9artlJa1LISweD +MWWi7WILGGzQLa5UAtWYK5Z7jXrkFah+3K8oFOWmDr0IVbgiyNvHJ7qpUSPSG2R9UdB xQUBJNACCJuqV8mZY435Ba9iLfawEo7eghzOvInyghYxV8NbRdr+dMl6/8l4+YKgkekG Xxxg== 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=q3YdKqlTpaeyd7qFiQXdhugy5viBkTFrFIMgZ9lGTQa+arWzuGzNWea2CZWtEUA/ha PSJYAXYSjH9mzFVfTY+goUNgtAgelrbXpLCeF/8NPQprEngxVnsvG4sZVXlW1xcfOtN5 Mt/PEbyMr0DIWQwLpl1n74jevD9PyTOIcLPoHXEZE20lE6vr0XDok4MvRbaUuSRmMVU2 grU/LBzCPhuy1UKOuE63QcsoVGXEJWmKcOUVBWNIDjZ65YgJmUQDUEhYtLyWZbA3Qrsg ytB+z2YePxqBTtQ1JdW61+09qfN/rJzEOJyt6ULJu23o9iwh0TK6CnHNXVUtIJiBU6nr cEVw== X-Gm-Message-State: APjAAAXgpyFi0mrRWsY7z4pUMMiUhIodzI8fbBbwN7jHe/cCKThxrZZm /qyTSc+c9M2Idf67363Gphjt8V/49s0= X-Google-Smtp-Source: APXvYqwWpFfocSvOR1XlISrRFk36BIoJ5LL17x0ne+w2wRe92X5VHfCzXdLMjGDMZvb77yQeeUEYXw== X-Received: by 2002:a63:3f4f:: with SMTP id m76mr4742397pga.353.1582738892205; Wed, 26 Feb 2020 09:41:32 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id k67sm3463133pga.91.2020.02.26.09.41.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 09:41:31 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 26 Feb 2020 09:41:17 -0800 Message-Id: <1582738882-15842-7-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> References: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH V2 06/11] 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 Wed Feb 26 17:41:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1245233 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=n0rBaySS; 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 48SNR25H2Lz9sNg for ; Thu, 27 Feb 2020 04:42:06 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3CE1823067; Wed, 26 Feb 2020 17:42:05 +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 Mt7iulw9uAi4; Wed, 26 Feb 2020 17:41:58 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 0BD5722B6D; Wed, 26 Feb 2020 17:41:43 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D76D7C1D90; Wed, 26 Feb 2020 17:41:42 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5A97FC0177 for ; Wed, 26 Feb 2020 17:41:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 49AFA22F05 for ; Wed, 26 Feb 2020 17:41:41 +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 nF9cRp6oGLK8 for ; Wed, 26 Feb 2020 17:41:38 +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 silver.osuosl.org (Postfix) with ESMTPS id 0A2F622B7A for ; Wed, 26 Feb 2020 17:41:34 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id s1so120080pfh.10 for ; Wed, 26 Feb 2020 09:41:34 -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=n0rBaySSsUPjPc2h5R1QEngtFpfaCyqCCTPG1dWis7+J9DC3Rg4GiUNaWD1q1S+ooF 2iq5vjlGWx3WHlzloaI3eAuaUySu/4JLw8L98vzi3b+aP5cAbihP2ax/rL4AP4ASG+ev 0ecXfs9uSG8+UpBhQJD1RA7f8wP2ce6cYtzu/pEBgsTsQ4ZOHg1Zz7eOyJfdZIY0FUF3 2DWq/gqjcu7wfRB6FS6ePupRV7CFV0OgFDzOmGqVF+jK3jFrdqotaqZMoV3gTCeKTnA6 S/hBM5qIRgCvh1ghma3W8EqBqDLNmEd8lv+Y3qA1y55Nfc6vD5uDuB1+j8/sIMVOd1T/ 3t0g== 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=f0jKw/mtayHqgdw07YqNd9XMEjXdGwotSLDSRol+nSNugYgcHi42g5izvAmA/7ScKa lxKlC78/wN6MakpEADwBGazmNkCuetrSpGPs4ZltNqSV3j+xNYmJVn7Cj4ezrqZSpykO DLnGsaoYrBpaC8q+Nm4XPNgCFTKEJS8ViAOztwZhsyaRcb07acUL7WmBAkFuGwtu7j9d Ay0uCLw2ulRUv/z7TG8qVyW1Az2nCayMpHxjNJ4quA/BpDBpM0jiNgGOgDUPFWeZkugE PgGrY/R1ZAvYXi0CJtgqZo21CcDQenQKn8nywe3SMgS6yvLtmMdMNzFLtqYGlDBSuBWS AOHw== X-Gm-Message-State: APjAAAXhhzJtUpP7QpJuB3ZUOHzpMDxV1ceSmKaSjGY2OMInGcZkgL1m TDHG4j+JK84XvrU89Pp4lKki1h7jNuI= X-Google-Smtp-Source: APXvYqxWc913dJlvrpCDC9MCPiHhB2x+Gh2mghDclMfHoh0rozPDURFKUIbU/OHYUlo/zW7P77eGWQ== X-Received: by 2002:a63:1d18:: with SMTP id d24mr4719974pgd.189.1582738893283; Wed, 26 Feb 2020 09:41:33 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id k67sm3463133pga.91.2020.02.26.09.41.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 09:41:32 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 26 Feb 2020 09:41:18 -0800 Message-Id: <1582738882-15842-8-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> References: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> Cc: David Ahern Subject: [ovs-dev] [PATCH V2 07/11] 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 Acked-by: Yi-Hung Wei --- 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 Wed Feb 26 17:41:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1245236 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=l+SrhWYo; 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 48SNRL49H0z9sPK for ; Thu, 27 Feb 2020 04:42:22 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0B86522E6E; Wed, 26 Feb 2020 17:42:21 +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 YwDyOmweoLFs; Wed, 26 Feb 2020 17:42:17 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id DA84D2314A; Wed, 26 Feb 2020 17:41:54 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 891E3C1DC9; Wed, 26 Feb 2020 17:41:54 +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 AD346C1D8E for ; Wed, 26 Feb 2020 17:41:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9843C87929 for ; Wed, 26 Feb 2020 17:41:52 +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 LbqniyZJ20yF for ; Wed, 26 Feb 2020 17:41:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by whitealder.osuosl.org (Postfix) with ESMTPS id E4ED587884 for ; Wed, 26 Feb 2020 17:41:34 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id b185so127384pfb.7 for ; Wed, 26 Feb 2020 09:41:34 -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=l+SrhWYooSUtfQ+Rf1OAvyn9OZ6Nheo7xSut9gGsLiG87lFXU9/O8xp6R5lU+wh4qJ BxrZglF1qQDOV75nNiBx3PUj4H3b8LkuSn06Vdt1Vala2F7svbeP8rGO5eJP6MRZMIBW 64U0dsDBsLkeYT2jeNaBOwx3dWgsJC1wTS80DSzmlB5S9uU5i+4XwRux3dI8io62n92N QBJ8SPHqkNWeFoRftTgt3T0/2Me5LnxuqmcO+19Ra6RbcutTeiPgZNKXcDbEBudw/n28 mmt4E5rkk1oxW4KqfnkOBJvKt8fvnRnQRNPJ4oR6G+mXy8vFEXNhKtAAGo+uz3Evav8z qw8Q== 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=pEBpgDFJKz1VxFxAXCwDbaIIbMUDUag3dGzQRcVLqVA5IRuhYbzVLBn/BWhZUX2H1f 3jijZ2t1ztezRWH/X6eJxYY2I6CnKhUrsoOLgAPQlfqP0M2ud1nRnCgfPVS5S863Qek9 tT+hMuyH9NyIXN41RtjMdAdVN5ciHQ/J90ogmfvgNyO2ZLqQ2jWhfLjzUWl6BXSmyI7v n1l66SQ7mkjCDBAIG/n3HmuoGlpLQWjY45vL1gbXF4GPs5SSBYfFslxfqbzAYcZClSlS 8pc/a5/RfKlsR/esFe35H1fxHtbxheqYl185pfZ9bMCJ2dEE+VFtR+get6WQLAapIsXf HKAQ== X-Gm-Message-State: APjAAAUcZxnCb0PUrQ3XljbeEFIddDanTubsD45FYaCdisCPEsbQiCd9 tyZxWIub9U5MtOzRfREGOkmFIED34xw= X-Google-Smtp-Source: APXvYqylLkPlA8WxsKqIJdZKWZFiqjmF32yp3aohnT+alBLOEHGglyfRHVol80XNjCLnnuvhj15iEA== X-Received: by 2002:a65:668c:: with SMTP id b12mr26056pgw.14.1582738894276; Wed, 26 Feb 2020 09:41:34 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id k67sm3463133pga.91.2020.02.26.09.41.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 09:41:33 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 26 Feb 2020 09:41:19 -0800 Message-Id: <1582738882-15842-9-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> References: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH V2 08/11] 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 Wed Feb 26 17:41:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1245232 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=CskPapvt; 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 48SNQy6KN2z9sNg for ; Thu, 27 Feb 2020 04:42:02 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1446B87B72; Wed, 26 Feb 2020 17:42:01 +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 Cipfu6NMoqBQ; Wed, 26 Feb 2020 17:41:56 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id EF8068787C; Wed, 26 Feb 2020 17:41:38 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C398BC1D8E; Wed, 26 Feb 2020 17:41:38 +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 343B0C08A0 for ; Wed, 26 Feb 2020 17:41:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2F5EF86BAD for ; Wed, 26 Feb 2020 17:41:37 +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 MOmw76zjXbCA for ; Wed, 26 Feb 2020 17:41:36 +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 52A3186BA5 for ; Wed, 26 Feb 2020 17:41:36 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id r77so2580pgr.12 for ; Wed, 26 Feb 2020 09:41:36 -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=CskPapvtMZxKm5PYFVkz4nNXetEO41ZQd4TXNBHrmK0X+9kHnrXJK1qE+KInRfeEUI iwjvO9pjlwJK2rD7W2MTMMOTf/wiTKw2ZJ0Ae7HJvpFN9OsAkxsD1RXntmBJiuU0fol3 kSNxi9opz4F3yRet4hfmxSJf4BGcqN7uTJ82+tkYr+Q1dgRuMRwb67avJHK2nW+vEU/n d6jn5m9oyLZY7/HSkbK8INEBTEAEKRtxV5U4AsoC0wwjwUGzfUAomOIuuE+afydsH3oM 6J9PwU3FmHam7AQsgS8Blr+BvRtRsFNXUeF5gvqjRzOAf0CuHsEvAyS4/s+3EmgHCKou WcUA== 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=tqgUei5awbt05v1v2Wkxtddrd8bL/0wMoVUuUbW9qiCgeNdPod/XfCIISFowBPS4jZ qVgRsUFkegL6SxBpzx4P+OVqYwjCUsVXBZXsL4BGLJE7qi2RC/kJlwsvdQIGCGNYl6Qr 84EODJtWDD8KS3gHWbuaWDXQQhDiAApraAobATP9EOu4cpca6DcWhD2/z3gCerYa0LUM wDEtprSITKclSOBoJEklGlBagGuZFq9jCnkgxIuqUehsUqhKtQwC5U+gy0x/1sVbwxgy EwteIK8JXr5RnjYUSDh01SpYFRkhEPmtKIdJs88Kf41SCNcZe3i/VOB0BgcdnnmlfZsp X3QA== X-Gm-Message-State: APjAAAUA9lJJL8qkKA2b0HbGSsnkG9prOEJXztlmHiWDzAdw+NCXOFYi 4Leuhvn1Hkeoj355zSTJRde99opeMk0= X-Google-Smtp-Source: APXvYqxAcSmHPoMG9/E4fE1Q3oNRvGd5RjV+gQgh71+mQydtc35kjnuLyNzjoLX8Plc83C6ne9k9hw== X-Received: by 2002:a63:4b07:: with SMTP id y7mr5180pga.272.1582738895625; Wed, 26 Feb 2020 09:41:35 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id k67sm3463133pga.91.2020.02.26.09.41.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 09:41:34 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 26 Feb 2020 09:41:20 -0800 Message-Id: <1582738882-15842-10-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> References: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH V2 09/11] 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, From patchwork Wed Feb 26 17:41:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1245235 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=lv47y49/; 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 48SNR60lYrz9sNg for ; Thu, 27 Feb 2020 04:42:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D1F45878E6; Wed, 26 Feb 2020 17:42:07 +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 7jVgYcnC4yWR; Wed, 26 Feb 2020 17:42:01 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id D8405878D0; Wed, 26 Feb 2020 17:41:40 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C59C6C08A0; Wed, 26 Feb 2020 17:41:40 +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 77F04C1D93 for ; Wed, 26 Feb 2020 17:41:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 649D987B94 for ; Wed, 26 Feb 2020 17:41:39 +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 uW-LnQ3E30NY for ; Wed, 26 Feb 2020 17:41:37 +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 hemlock.osuosl.org (Postfix) with ESMTPS id 73BEE87B96 for ; Wed, 26 Feb 2020 17:41:37 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id d9so25417pgu.3 for ; Wed, 26 Feb 2020 09:41:37 -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=X+kQcD6X9BD0evwqZDZBsO/pQHipPZB5EXNSLxPUP70=; b=lv47y49/wrT4IBY4I8YE9JrR/ppJIhPXa1E3UFsnIpnPH3mQ/MXLwngQofvZIg0+2E ulKAC8pJIBm0uoPEA5GWa9NgOS3gPyKZ33p85bqXzLajK67rDReYOXaAgOPSVD0EfslN hiopTWU/dCZdSEmIwi/orYn7HwSkIAL33hhADub+fFOs89r9RbsZNpZRpwgYoOFYDCLh 05ejCaniLyqtIbB/n4vaWThsEmosUH1H3mQDYo3XpA10pdjLsPzQH5mGT+9e8C6PfOGr JjWlG/clnaPj7Tn/djtV4YqES0+UcvjkT6IxyivmuvnPxq9ioZGTntD2svEMavEC/Yt+ E6rA== 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=X+kQcD6X9BD0evwqZDZBsO/pQHipPZB5EXNSLxPUP70=; b=govNba+xBoEUyAjyA0YEJ660w6y1+E/EG1xoVK6BpWhrm9l/0+0owjanqIFzOtA657 TECiMAL/cdLEFeUToVd6WIzn51rPyWfnioudYQbfs9YHprWqKWQI8/FWtTKHvPidf8XM Tv45MqgMv6pl5ulK9NFjZbQpvNsBvbygs/zIgpbNq87FpUN0mQoxpI+y9+sV4nmbo2XQ qaiwuW+UfFB31XkS6kfOgW8YsgBsWO86AP4BsmlcLDdb7POBrHhhyPZ16Ax6+eW+qrzW iXBQw5MNqR8FMMvDVwN0JU23/cvQjbOaCbddLFyWfg+Wi79A/elRTIA53/H1z60kJyZQ oXdA== X-Gm-Message-State: APjAAAXQz9h2vm5fYLqCswVzxEOu97MGlkB9mwNNt1Ff1K0bS28UXUAS kLQwSQchRMc1/SMRr/hIqCVHlJw9z70= X-Google-Smtp-Source: APXvYqw0OQ3NY1Q6O9ak1qsvxoQb+EIpLZoRKaPJ9R8jFKKj4W5yuEA5hdzZlriClqzc+90XGvK3fA== X-Received: by 2002:aa7:8687:: with SMTP id d7mr5462394pfo.164.1582738896609; Wed, 26 Feb 2020 09:41:36 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id k67sm3463133pga.91.2020.02.26.09.41.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 09:41:36 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 26 Feb 2020 09:41:21 -0800 Message-Id: <1582738882-15842-11-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> References: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH V2 10/11] FAQ: Update with latest Linux 5.5 kernel support 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 --- Documentation/faq/releases.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst index 6ff47d7..a073b97 100644 --- a/Documentation/faq/releases.rst +++ b/Documentation/faq/releases.rst @@ -70,6 +70,7 @@ Q: What Linux kernel versions does each Open vSwitch release work with? 2.10.x 3.10 to 4.17 2.11.x 3.10 to 4.18 2.12.x 3.10 to 5.0 + 2.13.x 3.10 to 5.5 ============ ============== Open vSwitch userspace should also work with the Linux kernel module built From patchwork Wed Feb 26 17:41:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 1245230 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=IjoWASTF; 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 48SNQq6sKFz9sNg for ; Thu, 27 Feb 2020 04:41:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 300E487B6A; Wed, 26 Feb 2020 17:41:54 +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 8ENbhykL0Wir; Wed, 26 Feb 2020 17:41:52 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 7176E820B2; Wed, 26 Feb 2020 17:41:52 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 45B36C1D8E; Wed, 26 Feb 2020 17:41:52 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id B58CBC1D92 for ; Wed, 26 Feb 2020 17:41:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 8A2A522D9E for ; Wed, 26 Feb 2020 17:41:50 +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 UZJq4hdk+rXQ for ; Wed, 26 Feb 2020 17:41:47 +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 silver.osuosl.org (Postfix) with ESMTPS id CCD362206D for ; Wed, 26 Feb 2020 17:41:38 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id a14so4818pgb.11 for ; Wed, 26 Feb 2020 09:41:38 -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=fHnxofi1MvInWGbzRNAxNBafDzjpEwv+Dxo31Hvt/7c=; b=IjoWASTFG9zmSPP6yhQTULjjlpCrWCRxZsSLsrf7ovZR7XNSUNGeHUWgc1cuyOQtpF 2qS2MLt5wK72gp/DD+Q2oOCSdJ/DnqxGIk7luEwCxuFGvj3n4crfbBv8P8nYZVWPiAPE W/FUqHdnSYrUgcDsCHeHGlVoZmGWuCrQ3qAIMuByBeOskfpb7g2jTfq1OK8sXcc14qqP ToD5r4tFpWyHqpfdjThBuNb+EFKXCjXYk4+yO2xjjE0tdwvoiDFFJl+7cDvXPzzjPSYJ zEoi2lmRjg36k13yTAhY+/QiF6BdFo9W0wDkO7aAJRI3JnkMbShU+tPg0uu508EF6W2q 9lAA== 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=fHnxofi1MvInWGbzRNAxNBafDzjpEwv+Dxo31Hvt/7c=; b=KXySNOHH1wuJHLz42nQIc8w/BnZv61IVtN5dVqvdg42cMxttOeuLFLbousuIeGwaCM AZFFY9x4B6mroYB6Yvy6kHFGtCimjVfxPxov7WxsLMc2jCemi+lmRiQSKb93rPkO38dx p6nJLdX+T7enLgEfH6wKYx0UWZ25j2ZGEne1mr/5c3Me10lS05iA+ZOlg+Bl3abh9vl6 SflAk8aEYjAcBzw6QkWjotbRn9Rw0CExLstAz3n5/V3O2u1GsyDV9dFe58ZMOcIANEJS Q2EHJTk6HNkism3B1tJfvVw8LWUIgN5826HZ+cUqbqy9JWIoT7XmsrHI9S+T+FuSjPmC 8Ing== X-Gm-Message-State: APjAAAW2tX+1n3M2UEI4ldx8ORdzYuzWyXgkxd0yKMl2of/iDBf6l4+f nHc+t7LPjwmgZo8DIs4EYKbkh9/+Quk= X-Google-Smtp-Source: APXvYqwehAiONKCKWlBJwMscXfYPcqkyuEgOqctmB6/MUSCEZegHEBs+KhhimoVdGTGbvtgHoCDIvg== X-Received: by 2002:aa7:84c4:: with SMTP id x4mr5468476pfn.144.1582738898054; Wed, 26 Feb 2020 09:41:38 -0800 (PST) Received: from gizo.domain (97-115-113-182.ptld.qwest.net. [97.115.113.182]) by smtp.gmail.com with ESMTPSA id k67sm3463133pga.91.2020.02.26.09.41.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Feb 2020 09:41:37 -0800 (PST) From: Greg Rose To: dev@openvswitch.org Date: Wed, 26 Feb 2020 09:41:22 -0800 Message-Id: <1582738882-15842-12-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> References: <1582738882-15842-1-git-send-email-gvrose8192@gmail.com> Subject: [ovs-dev] [PATCH V2 11/11] NEWS: Add news about support for 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 --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index f62ef1f..6f6b61f 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ Post-v2.13.0 - OpenFlow: * The OpenFlow ofp_desc/serial_num may now be configured by setting the value of other-config:dp-sn in the Bridge table. + - Linux datapath: + * Support for kernel versions up to 5.5.x. v2.13.0 - 14 Feb 2020