public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Gonglei (Arei)" <arei.gonglei@huawei.com>
To: zhenwei pi <pizhenwei@bytedance.com>
Cc: "jasowang@redhat.com" <jasowang@redhat.com>,
	"virtualization@lists.linux-foundation.org" 
	<virtualization@lists.linux-foundation.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"helei.sig11@bytedance.com" <helei.sig11@bytedance.com>,
	"mst@redhat.com" <mst@redhat.com>
Subject: RE: RE: [PATCH 2/3] virtio-crypto: introduce akcipher service
Date: Thu, 10 Feb 2022 09:21:13 +0000	[thread overview]
Message-ID: <34ba8701eb86414e826824892e2f0892@huawei.com> (raw)
In-Reply-To: <540f29e4-12ef-3786-bd54-9a94ba6ee7ab@bytedance.com>



> -----Original Message-----
> From: zhenwei pi [mailto:pizhenwei@bytedance.com]
> Sent: Thursday, February 10, 2022 4:18 PM
> To: Gonglei (Arei) <arei.gonglei@huawei.com>
> Cc: jasowang@redhat.com; virtualization@lists.linux-foundation.org;
> linux-crypto@vger.kernel.org; linux-kernel@vger.kernel.org;
> helei.sig11@bytedance.com; mst@redhat.com
> Subject: Re: RE: [PATCH 2/3] virtio-crypto: introduce akcipher service
> 
> >>   /* The accelerator hardware is ready */  #define
> >> VIRTIO_CRYPTO_S_HW_READY  (1 << 0) @@ -442,6 +520,7 @@ struct
> >> virtio_crypto_config {
> >>   	__le32 reserve;
> >>   	/* Maximum size of each crypto request's content */
> >>   	__le64 max_size;
> >> +	__le32 akcipher_algo;
> >>   };
> >>
> > You can use the reserve attribute. Keeping 64-bit aligned.
> >
> >>   struct virtio_crypto_inhdr {
> >> --
> >> 2.25.1
> >
> 
> Can I use the "__le32 reserve;" field directly?
> 
> struct virtio_crypto_config {
>          /* See VIRTIO_CRYPTO_OP_* above */
>          __le32  status;
> 
>          /*
>           * Maximum number of data queue
>           */
>          __le32  max_dataqueues;
> 
>          /*
>           * Specifies the services mask which the device support,
>           * see VIRTIO_CRYPTO_SERVICE_* above
>           */
>          __le32 crypto_services;
> 
>          /* Detailed algorithms mask */
>          __le32 cipher_algo_l;
>          __le32 cipher_algo_h;
>          __le32 hash_algo;
>          __le32 mac_algo_l;
>          __le32 mac_algo_h;
>          __le32 aead_algo;
>          /* Maximum length of cipher key */
>          __le32 max_cipher_key_len;
>          /* Maximum length of authenticated key */
>          __le32 max_auth_key_len;
>          __le32 reserve;            -->    __le32 akcipher_algo;
>          /* Maximum size of each crypto request's content */
>          __le64 max_size;
> };
> 


Yes, I think so. Otherwise you will add other reserved field :(

Regards,
-Gonglei

  reply	other threads:[~2022-02-10  9:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21  2:24 [PATCH 0/3] Introduce akcipher service for virtio-crypto zhenwei pi
2022-01-21  2:24 ` [PATCH 1/3] virtio_crypto: Introduce VIRTIO_CRYPTO_NOSPC zhenwei pi
2022-02-10  7:22   ` Gonglei (Arei)
2022-01-21  2:24 ` [PATCH 2/3] virtio-crypto: introduce akcipher service zhenwei pi
2022-02-10  7:51   ` Gonglei (Arei)
2022-02-10  8:18     ` zhenwei pi
2022-02-10  9:21       ` Gonglei (Arei) [this message]
2022-01-21  2:24 ` [PATCH 3/3] virtio-crypto: implement RSA algorithm zhenwei pi
2022-01-21  6:36   ` kernel test robot
2022-01-21  8:29   ` [RFC PATCH] virtio-crypto: virtio_crypto_rsa_do_req() can be static kernel test robot
2022-01-21  8:39   ` [PATCH 3/3] virtio-crypto: implement RSA algorithm kernel test robot
2022-01-21 21:43   ` kernel test robot
2022-01-22  0:19   ` kernel test robot
2022-02-10  6:55 ` PING: [PATCH 0/3] Introduce akcipher service for virtio-crypto zhenwei pi
2022-02-10  7:17   ` Jason Wang
2022-02-10  7:23     ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34ba8701eb86414e826824892e2f0892@huawei.com \
    --to=arei.gonglei@huawei.com \
    --cc=helei.sig11@bytedance.com \
    --cc=jasowang@redhat.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pizhenwei@bytedance.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox