From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 41C851BE67 for ; Fri, 21 Dec 2018 17:28:38 +0100 (CET) Received: by mail-pf1-f196.google.com with SMTP id h3so2838062pfg.1 for ; Fri, 21 Dec 2018 08:28: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=pQ97dOk27bZa2oa9lhTydoFIF7vkjJfNUtF1AlaXXTU=; b=dGXjSZgzIqbTGm6iA4Y5nM+toKuBfbwjI8wwNT8pEtUvATE3/gUdhYnp2MXbhMzR6D HJsmJeRxOzaButRzB1UAmXjEdHrnQbDcLsBPSwHNMTOAFXb1Ve02QUp5ODtNBBYTkB0k zSXITq/CXJilrlhOdBvf0HuoGbRtTjyKJ122kkfds48guVMiLXkSoak7CAE1xs3Wp0Na rIcNz52T6CYVrvxJk2QiV2YpEQkpKJZAA3tD4v3uEM/RzBi1TuwRlX5jILVmq2Pkmhx4 sSbSB8zsM4bPydcOchh0h+jfelhovTL8VZyguI1cDtbgq/sWErynRjVcuXeVag8LVfmi bGgw== 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=pQ97dOk27bZa2oa9lhTydoFIF7vkjJfNUtF1AlaXXTU=; b=a0bJbWYVtoCtn9zy24bvwJLIe2lh0iMc5M9/nLFqNYbbda9ztuyEucY74Kr2PRCtIu f8FngnwYMgKaT0Z6HbhnYLbUdIzd8qGsK92VV/aIiaVL44O4pyFuiBpFb4mut7Pl/tyH Ud7H75LLPaWLHSdQTiPMOguq3WnHl52SseNUeYfXsvoPdIqbBDYwpGqdTTNvgJq14iDF gQBFBk0wbLiqejBh8Rvy/ShxYKZFqUjdfqFmjC7xnZatnHWiM1RpNzaINXP7RAkTIONQ qZ7S8oz464iPh5gtb4jUyr/Nd8vdSmJO2nC69+CbGM0wyKQtwsR6AFZsS/bC3w6r62LM iZVQ== X-Gm-Message-State: AA+aEWYCJCm9gq5XBJ3I5mI2ZKESrDB7qP/RQHIWR3LgVR/JwMh5XWNF j0k8o4m0yFGE4rEVI7bp2tS5ZKDchpNs5w== X-Google-Smtp-Source: AFSGD/U8KgbfkjeibDN+fTK7Khtezu6AOXuC2GAMmVCKjn3bZcSiG54FYaFrduQkGDFn6l/b7JvIcQ== X-Received: by 2002:a62:2547:: with SMTP id l68mr3147608pfl.131.1545409717259; Fri, 21 Dec 2018 08:28:37 -0800 (PST) Received: from boston-io2.cn.ibm.com ([153.254.110.20]) by smtp.gmail.com with ESMTPSA id n70sm37149947pfi.185.2018.12.21.08.28.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Dec 2018 08:28:36 -0800 (PST) From: David Zeng X-Google-Original-From: David Zeng To: dev@dpdk.org Cc: David Zeng Date: Sat, 22 Dec 2018 00:27:33 +0800 Message-Id: <1545409653-72601-2-git-send-email-zengxhsh@cn.ibm.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1545409653-72601-1-git-send-email-zengxhsh@cn.ibm.com> References: <1545408927-72528-2-git-send-email-zengxhsh@cn.ibm.com> <1545409653-72601-1-git-send-email-zengxhsh@cn.ibm.com> Subject: [dpdk-dev] [PATCH] kni: fix build on RHEL8 and RHEL7.6-ALT X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Dec 2018 16:28:38 -0000 Signed-off-by: David Zeng --- kernel/linux/kni/compat.h | 9 ++++++++- kernel/linux/kni/ethtool/igb/kcompat.h | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 5aadebb..3c575c7 100644 --- a/kernel/linux/kni/compat.h +++ b/kernel/linux/kni/compat.h @@ -102,8 +102,15 @@ #undef NET_NAME_UNKNOWN #endif +/* + * RHEL has two different version with different kernel version: + * 3.10 is for AMD, Intel, IBM POWER7 and POWER8; + * 4.14 is for ARM and IBM POWER9 + */ #if (defined(RHEL_RELEASE_CODE) && \ - (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5))) + (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \ + (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)) && \ + (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0))) #define ndo_change_mtu ndo_change_mtu_rh74 #endif diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h index ae1b530..430aaba 100644 --- a/kernel/linux/kni/ethtool/igb/kcompat.h +++ b/kernel/linux/kni/ethtool/igb/kcompat.h @@ -3930,7 +3930,9 @@ static inline struct sk_buff *__kc__vlan_hwaccel_put_tag(struct sk_buff *skb, #endif #if (defined(RHEL_RELEASE_CODE) && \ - (RHEL_RELEASE_VERSION(7, 5) <= RHEL_RELEASE_CODE)) + (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \ + (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)) && \ + (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0))) #define ndo_change_mtu ndo_change_mtu_rh74 #endif -- 1.8.3.1