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 655D34595A; Wed, 11 Sep 2024 05:57:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BD4642F67; Wed, 11 Sep 2024 05:57:09 +0200 (CEST) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id A397C42F03 for ; Wed, 11 Sep 2024 05:57:06 +0200 (CEST) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2068acc8b98so58471735ad.3 for ; Tue, 10 Sep 2024 20:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1726027026; x=1726631826; 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=a10wV+YRVhQtQnsbWegM63ij9s732oWhtZXbN6Kfrww=; b=Mi+2QPrTquC3vVtT69W/bkBQKA3dyRBWK96mLmnYgJvKitjzvAZrs9kN9TegAwNpTd 1k1/ELKdqQ4prodp/Nys2VOsIxPv5qgRGMzWqmH2OV6FZRN29godmnIKxMGXhcoqX1KF QsKsIkkLwCaVqvFosB3N2xNPNgXxrjJWWb/4wRRsyMde7ilG0T1hmrv0Jtk5rf+Z10SJ cbiBFGM0c52zEEUII4yu/cbg0Bn7gjRM/9S8xTd5QZ8RujlN9HV7gJKWvfFwoULf6YvS SV1kqbg0d/nhvvTYXIH32cBvsoe6XEC4Uil5i1gtM9hcB/MRiM3LyR1VHML20qZk3T8W YHUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726027026; x=1726631826; 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=a10wV+YRVhQtQnsbWegM63ij9s732oWhtZXbN6Kfrww=; b=gIzmd+Aycypm82DFK2f9uQDIQ54lUhe981tN6lLtFXpsw7QwDC3AGJBu2Og40BW8XQ gWKFdZ2G5oxkvH+qBBTJ7hXdI7G+KD4XHRDp3lsFGTOdojF+EmG/1bJ/8gNcfa56uIwx GooWESGULUQ1+fPmlmPZv+MAa4FcZGEjSISz8lgoKkFBRG10CzujbYpJcxcMTIepKRC3 GJwvk+vyqg3WElmKAMrlZI4hy7O7LValM3F2a9UAdXkYC8ZbjjlOWEAlJvFTEoXWkTQh MKeDTbP5kDBy3wYfb5XRfB+vAVGY8/RTTnivWHIIKOptwD/LdaS1IcrWAw7B89HHZvOo cIRw== X-Gm-Message-State: AOJu0YxQmhpj05OKPqDHAmopEV5tCQV0BlbH+/mORFfxK0y4ccpk/AZM 8qoc9Hrh8/e0QP3dtE4rbD7yu8c6LNhGE3Jda2n40quXqWbA+j/YsjBg3eZjmtQ= X-Google-Smtp-Source: AGHT+IEnq43xIcsIWTCVKHAwIjrtT85fJCD2dRXvnV1V5pUwQxdn8EM4li9pZCO5T1dm9BJtp+8Pqw== X-Received: by 2002:a17:902:f546:b0:205:7c10:d618 with SMTP id d9443c01a7336-2074c5fd20dmr32648885ad.27.1726027025817; Tue, 10 Sep 2024 20:57:05 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20710f4be4bsm55228775ad.299.2024.09.10.20.57.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 20:57:05 -0700 (PDT) Date: Tue, 10 Sep 2024 20:50:58 -0700 From: Stephen Hemminger To: "WanRenyong" Cc: , , Subject: Re: [PATCH v2 05/19] net/xsc: add ioctl command interface Message-ID: <20240910205058.25bf5f8c@hermes.local> In-Reply-To: <20240911020740.3950704-6-wanry@yunsilicon.com> References: <20240911020740.3950704-6-wanry@yunsilicon.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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, 11 Sep 2024 10:07:26 +0800 "WanRenyong" wrote: > +#define XSC_IOCTL_CHECK_FIELD 0x01234567 > + > +#define XSC_IOCTL_MAGIC 0x1b > +#define XSC_IOCTL_CMDQ \ > + _IOWR(XSC_IOCTL_MAGIC, 1, struct xsc_ioctl_hdr) > +#define XSC_IOCTL_DRV_GET \ > + _IOR(XSC_IOCTL_MAGIC, 2, struct xsc_ioctl_hdr) > +#define XSC_IOCTL_CMDQ_RAW \ > + _IOWR(XSC_IOCTL_MAGIC, 5, struct xsc_ioctl_hdr) > + > +enum xsc_ioctl_opcode { > + XSC_IOCTL_GET_HW_INFO = 0x100, > +}; > + > +enum xsc_ioctl_opmod { > + XSC_IOCTL_OP_GET_LOCAL, > +}; > + > +struct xsc_ioctl_attr { > + uint16_t opcode; /* ioctl cmd */ > + uint16_t length; /* data length */ > + uint32_t error; /* ioctl error info */ > + uint8_t data[0]; /* specific table info */ Do not use zero length array (ZLA). Instead use variable length array (VLA) > +}; > + Does this device driver depend on some upstr