From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C2DBC4576C; Thu, 8 Aug 2024 17:22:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5837D427D2; Thu, 8 Aug 2024 17:22:32 +0200 (CEST) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mails.dpdk.org (Postfix) with ESMTP id D2B9F4278D for ; Thu, 8 Aug 2024 17:22:30 +0200 (CEST) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-70d23caf8ddso991042b3a.0 for ; Thu, 08 Aug 2024 08:22:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1723130550; x=1723735350; darn=dpdk.org; 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=nOXkkrJxBFCs693G0Wd43hJ7HMqYa8xAnNlTYBGdwRw=; b=Ub/Ty2P3y0hNiisNdJjzKpiTxjjzXe+vKZcSg6hxh5shV13eJZVnZIM65q8XAHaXSx 4nO9VPWJPV3cvTHLXg+v1XbhZ5Z6lxSnGJrZMxh+fY+AzULwZYX70r5KT+2FLDkkmXHO pjozVwBZqmIMGl23Y/M4fOjsPcD4sNQrz6SJKqPAAh8R2sUgGDX5/4ZRqOWm2gkBfw+G 5osQiM2yVUdsHUQ2PZFGEZDDtS/LsjU44/An97iVgofVkPxvji1z8XJYA44ygasTWzT7 dl3J1wsniyuS0i1NryK7HFb0MUwY1nveobF+WRakg2ObPC7VUjD6keVRdLlWcHH0C2vI zSDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723130550; x=1723735350; 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=nOXkkrJxBFCs693G0Wd43hJ7HMqYa8xAnNlTYBGdwRw=; b=BcLSpdST2//u2g+nMKeuRT8fxMPX6BB4sYTqQsXGiASzXy2WcNoqcosscHMvmkSR6T z+wYD5pKaKa0ONZGl1RoyaStSAC2vbgkxHTg1cw453g18sLQUfTxsjisSgFqELZlBBd0 7EoR2WXeJb6sFcMBRgdf+O8Z1NSYbMBW8ZjnJ5mkpCTY5S4wYuuPlPq0VLub2+gIWDBq J7M35KxmgINSy6ozfK/8qlRPf3Ew5o4zulfuQLFhXrBt+3W9ymaxzxW38o3uHA5UjHXC qcmnzzDRgkgMcWLzorLGqwHpj2uU8bzSMyoTU6PyddUBghzpyCTrj9/VeMKnWpEfe1mA 72jg== X-Gm-Message-State: AOJu0YxpjSN5XjEIvXDQDrsTAseiwhXBT803EYRk/VJI55C63nWYtcCR iCz3Fvk/kuCTA7uEIRxpxkWlGsMZXm8PSE8ZoiPoUnMvSx4PIWgC2ucKXHJKiWI= X-Google-Smtp-Source: AGHT+IFbscHZnBAx1MQgSGIr7xim6s1i1DbM0t2NSKcDVJtB3yDJuHwK42eyjfhdrGJy1eySjr5UpA== X-Received: by 2002:a05:6a00:21c4:b0:70d:21d9:e2ae with SMTP id d2e1a72fcca58-710cad37d72mr2777966b3a.6.1723130549821; Thu, 08 Aug 2024 08:22:29 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-710cb229917sm1247096b3a.64.2024.08.08.08.22.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Aug 2024 08:22:29 -0700 (PDT) Date: Thu, 8 Aug 2024 08:22:27 -0700 From: Stephen Hemminger To: Hanxiao Li Cc: dev@dpdk.org Subject: Re: [PATCH 1/4] [v1,1/4] zsda: Introduce zsda device drivers Message-ID: <20240808082228.39ef7e0a@hermes.local> In-Reply-To: <20240808085030.1685755-1-li.hanxiao@zte.com.cn> References: <20240808085030.1685755-1-li.hanxiao@zte.com.cn> 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, 8 Aug 2024 16:50:11 +0800 Hanxiao Li wrote: > diff --git a/drivers/common/zsda/zsda_common.c b/drivers/common/zsda/zsda_common.c > new file mode 100644 > index 0000000000..8f0849c660 > --- /dev/null > +++ b/drivers/common/zsda/zsda_common.c > @@ -0,0 +1,166 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2024 ZTE Corporation > + */ > + > +#include "zsda_common.h" > +#include "zsda_logs.h" > + > +#include "bus_pci_driver.h" > + > +#define MAGIC_SEND 0xab > +#define MAGIC_RECV 0xcd > +#define ADMIN_VER 1 > + > +static uint8_t crc8_table[256] = { > + 0x00, 0x41, 0x13, 0x52, 0x26, 0x67, 0x35, 0x74, 0x4c, 0x0d, 0x5f, 0x1e, > + 0x6a, 0x2b, 0x79, 0x38, 0x09, 0x48, 0x1a, 0x5b, 0x2f, 0x6e, 0x3c, 0x7d, > + 0x45, 0x04, 0x56, 0x17, 0x63, 0x22, 0x70, 0x31, 0x12, 0x53, 0x01, 0x40, > + 0x34, 0x75, 0x27, 0x66, 0x5e, 0x1f, 0x4d, 0x0c, 0x78, 0x39, 0x6b, 0x2a, > + 0x1b, 0x5a, 0x08, 0x49, 0x3d, 0x7c, 0x2e, 0x6f, 0x57, 0x16, 0x44, 0x05, > + 0x71, 0x30, 0x62, 0x23, 0x24, 0x65, 0x37, 0x76, 0x02, 0x43, 0x11, 0x50, > + 0x68, 0x29, 0x7b, 0x3a, 0x4e, 0x0f, 0x5d, 0x1c, 0x2d, 0x6c, 0x3e, 0x7f, > + 0x0b, 0x4a, 0x18, 0x59, 0x61, 0x20, 0x72, 0x33, 0x47, 0x06, 0x54, 0x15, > + 0x36, 0x77, 0x25, 0x64, 0x10, 0x51, 0x03, 0x42, 0x7a, 0x3b, 0x69, 0x28, > + 0x5c, 0x1d, 0x4f, 0x0e, 0x3f, 0x7e, 0x2c, 0x6d, 0x19, 0x58, 0x0a, 0x4b, > + 0x73, 0x32, 0x60, 0x21, 0x55, 0x14, 0x46, 0x07, 0x48, 0x09, 0x5b, 0x1a, > + 0x6e, 0x2f, 0x7d, 0x3c, 0x04, 0x45, 0x17, 0x56, 0x22, 0x63, 0x31, 0x70, > + 0x41, 0x00, 0x52, 0x13, 0x67, 0x26, 0x74, 0x35, 0x0d, 0x4c, 0x1e, 0x5f, > + 0x2b, 0x6a, 0x38, 0x79, 0x5a, 0x1b, 0x49, 0x08, 0x7c, 0x3d, 0x6f, 0x2e, > + 0x16, 0x57, 0x05, 0x44, 0x30, 0x71, 0x23, 0x62, 0x53, 0x12, 0x40, 0x01, > + 0x75, 0x34, 0x66, 0x27, 0x1f, 0x5e, 0x0c, 0x4d, 0x39, 0x78, 0x2a, 0x6b, > + 0x6c, 0x2d, 0x7f, 0x3e, 0x4a, 0x0b, 0x59, 0x18, 0x20, 0x61, 0x33, 0x72, > + 0x06, 0x47, 0x15, 0x54, 0x65, 0x24, 0x76, 0x37, 0x43, 0x02, 0x50, 0x11, > + 0x29, 0x68, 0x3a, 0x7b, 0x0f, 0x4e, 0x1c, 0x5d, 0x7e, 0x3f, 0x6d, 0x2c, > + 0x58, 0x19, 0x4b, 0x0a, 0x32, 0x73, 0x21, 0x60, 0x14, 0x55, 0x07, 0x46, > + 0x77, 0x36, 0x64, 0x25, 0x51, 0x10, 0x42, 0x03, 0x3b, 0x7a, 0x28, 0x69, > + 0x1d, 0x5c, 0x0e, 0x4f}; > + This table should be const, and is the same CRC32 as implemented alread in lib/hash/rte_crc ?