From b67bba36e24e8a77d04f7113de2a8be08199049d Mon Sep 17 00:00:00 2001 From: Hyo-Kyung Lee Date: Mon, 20 Feb 2023 20:01:09 -0600 Subject: [PATCH 1/3] fix: use a fixed number 32 --- lib/vhost/vhost_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index d702d082ddf..c26d6825714 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vhost_user.c @@ -62,7 +62,7 @@ typedef struct vhost_message_handler { int main_fd); bool accepts_fd; } vhost_message_handler_t; -static vhost_message_handler_t vhost_message_handlers[]; +static vhost_message_handler_t vhost_message_handlers[32]; static int send_vhost_reply(struct virtio_net *dev, int sockfd, struct vhu_msg_context *ctx); static int read_vhost_message(struct virtio_net *dev, int sockfd, struct vhu_msg_context *ctx); From 2b9e106cf7edc712ff30baf507c96ddd49ad294e Mon Sep 17 00:00:00 2001 From: Hyo-Kyung Lee Date: Mon, 20 Feb 2023 20:57:38 -0600 Subject: [PATCH 2/3] fix: use 41 to match vhost_user.h --- lib/vhost/vhost_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index c26d6825714..891b68a6429 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vhost_user.c @@ -62,7 +62,7 @@ typedef struct vhost_message_handler { int main_fd); bool accepts_fd; } vhost_message_handler_t; -static vhost_message_handler_t vhost_message_handlers[32]; +static vhost_message_handler_t vhost_message_handlers[41]; static int send_vhost_reply(struct virtio_net *dev, int sockfd, struct vhu_msg_context *ctx); static int read_vhost_message(struct virtio_net *dev, int sockfd, struct vhu_msg_context *ctx); From a1d53d0611942328914580d94314b10b8a48efbb Mon Sep 17 00:00:00 2001 From: Hyo-Kyung Lee Date: Mon, 20 Feb 2023 22:06:20 -0600 Subject: [PATCH 3/3] fix: empty[] to empty[0] --- drivers/crypto/openssl/rte_openssl_pmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index abcb641a446..340e3bb86ed 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -1196,7 +1196,7 @@ process_openssl_auth_encryption_gcm(struct rte_mbuf *mbuf_src, int offset, uint8_t *dst, uint8_t *tag, EVP_CIPHER_CTX *ctx) { int len = 0, unused = 0; - uint8_t empty[] = {}; + uint8_t empty[0] = {}; if (EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, iv) <= 0) goto process_auth_encryption_gcm_err; @@ -1275,7 +1275,7 @@ process_openssl_auth_decryption_gcm(struct rte_mbuf *mbuf_src, int offset, uint8_t *dst, uint8_t *tag, EVP_CIPHER_CTX *ctx) { int len = 0, unused = 0; - uint8_t empty[] = {}; + uint8_t empty[0] = {}; if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, 16, tag) <= 0) goto process_auth_decryption_gcm_err;