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 1FC9C42C04; Thu, 1 Jun 2023 17:02:42 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EEA542D4B; Thu, 1 Jun 2023 17:01:26 +0200 (CEST) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id 7EDD142D35 for ; Thu, 1 Jun 2023 17:01:23 +0200 (CEST) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1b00ffb4186so5199805ad.0 for ; Thu, 01 Jun 2023 08:01:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685631682; x=1688223682; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SRf7mhU5Ui3qEPXgyHB19qZMBbPmBo6F4Ki2T26Ioc4=; b=3ovClv5K8VzpXU8nu9lLpfuVSUFc1xbTMTl0yKhEJDTB7QAiSWtZRT7EvZiRE8rQ11 QeWw/Fj1qX9DXnnlehTmUK/JmEhV5HdtgZ/NNNA+CWB6BhJe76VP1qAAqkDoc/qzcdmp nA8WgkcWLXPsZhAB4S4HUk2eXuaez+DFqNxgS+wQ7y7/EcujLVq1BzANlXR4Fx3ues+V Mj+eQ4vILUxchkIiS6gwr6F97t3rXTpbC0r8FCx+LpMmI2bD70YKrJO4cjGezBqfz4v6 ZjLi4dJCMzVRSv/Mj6A5iphtS7CAIYvCFmkw1oBNPil4SjRKwAOjk8Qz+QnGMqBsajMQ mUew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685631682; x=1688223682; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SRf7mhU5Ui3qEPXgyHB19qZMBbPmBo6F4Ki2T26Ioc4=; b=AyZhIyTS7dO1a4wZefFGVT863EY/g83l3KGBXVDaloqcVJ46yUyhc3Y4Q6h7AX22GW l8Ihu6KQSLPsFawcf9MAz4I+D3MTiTQl2IJ4OtTpHGLQ/os1rtVJJ9xShzOoi6mQ5oVu JEKLz2TooqQeavr0yMcEG85I8dybQHqpq73ef85i0Ne2FCYDtGFL19NryBNHwhanNZ+V Lbr1Wj3Wobe2i0BPm0kg5hiT7u1felK+sec6NR2S004V3KIRVONz6KTkduIqkHiWL2wZ 8GDiLY8F+6vKJ3QNaq9D+gRMtFmABXbWOlVyqUfGY00yqHCTD+aC7tJ6KugyAQXnS/vP 59fw== X-Gm-Message-State: AC+VfDxyYmS2K6pZmshX6prpPIybUKl8KeD3aR+rgewp9qdSCChYFCVy n8g+NnYiIb2MpW7LKKV49fyMsRdC35hAqWCjh8mVRA== X-Google-Smtp-Source: ACHHUZ4BS7ofx96yz6xRxd2ww9GHPDzjglvni8zgUYM+FUlLgTWPlCW7URXcs9Z+RjodxnhoB+qYtg== X-Received: by 2002:a17:902:f684:b0:1b0:e0a:b7ab with SMTP id l4-20020a170902f68400b001b00e0ab7abmr7466563plg.31.1685631682475; Thu, 01 Jun 2023 08:01:22 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id ij9-20020a170902ab4900b001ac40488620sm3661955plb.92.2023.06.01.08.01.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 08:01:22 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Kai Ji , Pablo de Lara Subject: [PATCH 08/25] crypto/ipsec_mb: remove unnecessary snprintf Date: Thu, 1 Jun 2023 08:00:49 -0700 Message-Id: <20230601150106.18375-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230601150106.18375-1-stephen@networkplumber.org> References: <20230601150106.18375-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Can just use the ring name directly. Signed-off-by: Stephen Hemminger --- drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c index 3e52f9567401..4af6592f12c5 100644 --- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c +++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c @@ -185,12 +185,7 @@ static struct rte_ring struct ipsec_mb_qp *qp, unsigned int ring_size, int socket_id) { struct rte_ring *r; - char ring_name[RTE_CRYPTODEV_NAME_MAX_LEN]; - - unsigned int n = rte_strlcpy(ring_name, qp->name, sizeof(ring_name)); - - if (n >= sizeof(ring_name)) - return NULL; + const char *ring_name = qp->name; r = rte_ring_lookup(ring_name); if (r) { -- 2.39.2