From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id D5C8542B3E;
	Fri, 19 May 2023 22:56:13 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id AC4BE41141;
	Fri, 19 May 2023 22:56:13 +0200 (CEST)
Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com
 [209.85.214.175])
 by mails.dpdk.org (Postfix) with ESMTP id C4F0540E25
 for <dev@dpdk.org>; Fri, 19 May 2023 22:56:12 +0200 (CEST)
Received: by mail-pl1-f175.google.com with SMTP id
 d9443c01a7336-1ae51b07338so26251925ad.0
 for <dev@dpdk.org>; Fri, 19 May 2023 13:56:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1684529772;
 x=1687121772; 
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:from:to:cc:subject:date
 :message-id:reply-to;
 bh=jbfBjmgSQcupesoIL1VSe3qqXbvXCJ0r7BDTxfejoWc=;
 b=CGMEw8XONI15lF822SvKp0l1JVe/bi6uvLYA90YY+I/9xA6+MQ2LfMcMZBB93V9+Wa
 n01m7KfoCd7QGnFbn3w2GD2ZvQfEz2MgF0Jc6tJdzC0Y9hLXpe7Q2ICtb8nvkobdKT7v
 7OLMmxw1rFtF5vPawMbc3ijoCAfgV3pNioKhnySnTJqL5rJlXmwXJQFOOWQJx8n6J0K9
 HK97RUtwf9yNg+gY/i8zc+SQtiv8616DU+fB+9tRUa6QcpgZ2+ZUOvx6ZH6M5t0r9OeU
 fpn0MMO53838P0gfE5baoySmPEXJcoOlEo+XOwdoA9KMrWYD0WXCfzMnLEoD0amWbpfc
 FuWQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1684529772; x=1687121772;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=jbfBjmgSQcupesoIL1VSe3qqXbvXCJ0r7BDTxfejoWc=;
 b=gtd8dIWMiNa0hl2T4isNLDy7+QeXCXuGp/PnKdfxmaXxT12gETuwCFCzaKs5gL05K8
 qhram8VQJ58IjO/S7o7rrvIrgetUpFakzh9AL+hDG3AcyKdnLOMmPTWz4MZvgqIeMjJ3
 XH2vzu1gH2Lxd+tiv0kBu3zQfIsI0JtTXFhM5m8ztsnDjR+k+EJ9MM2ykotVnO6EPiDB
 VYhi5ny/EjANos9XPGSVGWFrNiUB4Dnk74/XhBi07TtkoxbQQ+nxLG9ND2IiAOzTqD6E
 zbBKD5cndcDMoTl3XU75pgOExLgntRYm9cibHdwL9zwb9knhvihgdaDOQ3TcfboMnjuq
 62mg==
X-Gm-Message-State: AC+VfDyDm5X3eV1L92rtusj2iwc6jXcTibBMpkOpb2cSsYztVGy4oLaj
 k3tWwhaPIkxR8xTDyf4f9z518w==
X-Google-Smtp-Source: ACHHUZ4+DdAdSgcAkNqW5/qzhoNZmW/vQprusFnbHOUplyTRH4amjDBDUOPP8UzRo8j3GWVS36QQbw==
X-Received: by 2002:a17:902:b48f:b0:1a8:1c9a:f68 with SMTP id
 y15-20020a170902b48f00b001a81c9a0f68mr3575431plr.36.1684529771815; 
 Fri, 19 May 2023 13:56:11 -0700 (PDT)
Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])
 by smtp.gmail.com with ESMTPSA id
 jd15-20020a170903260f00b001a634e79af0sm36232plb.283.2023.05.19.13.56.11
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 19 May 2023 13:56:11 -0700 (PDT)
Date: Fri, 19 May 2023 13:56:09 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: Rushil Gupta <rushilg@google.com>
Cc: ferruh.yigit@amd.com, qi.z.zhang@intel.com, jingjing.wu@intel.com,
 junfeng.guo@intel.com, joshwash@google.com, dev@dpdk.org, Jeroen de Borst
 <jeroendb@google.com>
Subject: Re: [v4] net/gve: check driver compatibility
Message-ID: <20230519135609.52338b1e@hermes.local>
In-Reply-To: <20230519204618.1507956-1-rushilg@google.com>
References: <20230519072600.1444309-1-rushilg@google.com>
 <20230519204618.1507956-1-rushilg@google.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Fri, 19 May 2023 13:46:18 -0700
Rushil Gupta <rushilg@google.com> wrote:

> +#include <rte_version.h>
>  
>  #include "../gve_logs.h"
>  
> +#ifdef __linux__
> +#include <sys/utsname.h>
> +#endif
> +
>  typedef uint8_t u8;
>  typedef uint16_t u16;
>  typedef uint32_t u32;
> @@ -73,6 +78,12 @@ typedef rte_iova_t dma_addr_t;
>  
>  #define msleep(ms)		rte_delay_ms(ms)
>  
> +#define OS_VERSION_STRLEN 128
> +struct os_version_string {
> +	char os_version_str1[OS_VERSION_STRLEN];
> +	char os_version_str2[OS_VERSION_STRLEN];
> +};
> +

Not sure this a good idea. Are you having the host validate
against DPDK versions. This is a bad idea.

Better to use feature bits like virtio and not be creating
and validating strings about versions.  For example, ever minor
stable release changes this.