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 68AD243C12; Fri, 1 Mar 2024 18:23:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2019E434C5; Fri, 1 Mar 2024 18:18:30 +0100 (CET) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id DE21F43007 for ; Fri, 1 Mar 2024 18:18:00 +0100 (CET) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1dca160163dso23224965ad.3 for ; Fri, 01 Mar 2024 09:18:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709313480; x=1709918280; darn=dpdk.org; 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=1BdvH/jouAqBbSMTjtk2oSIPDlB0H24n6S0x1MNUw1s=; b=gVngJpHqCh1CTwAsX6RDcJJu1QGW9zZRuYvnm4fvoWXejiDi9lDKfp2CkKjp36MHH2 sbFMlF43ZjvLN6UOlnfaQeHrNsCpvV+fCzROOxSkZxYil6kMVcIRCqmjU2A950AgpEzb uNB08kL7L+EEQU08O7tHskGVVeSAjNde3zUGXsYMG7brgRaELfZcJr9A4YUCm0OM4R+3 YMsWaCE7yKlbEDEoEbsXIw9DEGJay3R7AI8lyYfltiuxXxDlGLajR2ypU+KywAgq53yx HdRXAT10QwqwWlOAhU3vhBRYM0NkCbi2X8n1KAiHfL1yxH67ktHzsoI4HZmeUhA0dOkh C6Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709313480; x=1709918280; 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=1BdvH/jouAqBbSMTjtk2oSIPDlB0H24n6S0x1MNUw1s=; b=o2Q4kj+jl4h/rvQKocXoFaXYkOjO+j2StMzfLeC5Imh3GMPuTSEXPbl7n5pRly+rZt WOxkZ53+9PTSx1XUztEe/+HrnkDreYTrNs6QTEvQtT7jtci1uJebw2heGBlpbFD2u8+2 S8nBBfnigDkIk7cwjS5y8w8sx+2ByXCz+m3p8FVFZqpK0+BsQsyfeLrf67KV+htyNcO+ 48WSkukSImvQsjFcGBU2v9s/4kj3/ftum7UE8MeaAl/WwEGzx6FaS2w7DgdEB2f1ZfyZ gr/D5JsU/x60oD0xCjOL0/cuyz34mV77JwKu6jNaGwCQc3a/dLpq1Bq1as/IDP42QTOY 4lzA== X-Gm-Message-State: AOJu0Yz5TcnDM1dldndGo0OE8fgNLqjv5YqmkMBSZB/4PDdkbYSXjg83 7JuzQTc8Kn6L4vLKtcI2pjLvHlmUHcHxFayp0zbDjZX3jUpBPr31odVBWva7WDfg2bY/LBJ5omJ Q8y96bQ== X-Google-Smtp-Source: AGHT+IFryp+5PI0ZkRtkDpPeh38xSpjsfJIL2EI70H5D+Qmu2NK59dxaOxaDlAF3VJHLwntTS4MOZg== X-Received: by 2002:a17:902:a50e:b0:1db:aa46:4923 with SMTP id s14-20020a170902a50e00b001dbaa464923mr2217247plq.40.1709313480158; Fri, 01 Mar 2024 09:18:00 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id j14-20020a170902da8e00b001dc8d6a9d40sm3695764plx.144.2024.03.01.09.17.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:17:59 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ajit Khaparde , Somnath Kotur Subject: [PATCH v2 55/71] net/bnxt: replace use of fixed size rte_memcpy Date: Fri, 1 Mar 2024 09:15:51 -0800 Message-ID: <20240301171707.95242-56-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240301171707.95242-1-stephen@networkplumber.org> References: <20240229225936.483472-1-stephen@networkplumber.org> <20240301171707.95242-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 Automatically generated by devtools/cocci/rte_memcpy.cocci Signed-off-by: Stephen Hemminger --- drivers/net/bnxt/bnxt_flow.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index f25bc6ff78c7..6466aa394af1 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -233,8 +233,9 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr, "DMAC is invalid!\n"); return -rte_errno; } - rte_memcpy(filter->dst_macaddr, - ð_spec->hdr.dst_addr, RTE_ETHER_ADDR_LEN); + memcpy(filter->dst_macaddr, + ð_spec->hdr.dst_addr, + RTE_ETHER_ADDR_LEN); en |= use_ntuple ? NTUPLE_FLTR_ALLOC_INPUT_EN_DST_MACADDR : EM_FLOW_ALLOC_INPUT_EN_DST_MACADDR; @@ -257,8 +258,9 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr, "SMAC is invalid!\n"); return -rte_errno; } - rte_memcpy(filter->src_macaddr, - ð_spec->hdr.src_addr, RTE_ETHER_ADDR_LEN); + memcpy(filter->src_macaddr, + ð_spec->hdr.src_addr, + RTE_ETHER_ADDR_LEN); en |= use_ntuple ? NTUPLE_FLTR_ALLOC_INPUT_EN_SRC_MACADDR : EM_FLOW_ALLOC_INPUT_EN_SRC_MACADDR; @@ -423,23 +425,23 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr, en |= EM_FLOW_ALLOC_INPUT_EN_SRC_IPADDR | EM_FLOW_ALLOC_INPUT_EN_DST_IPADDR; - rte_memcpy(filter->src_ipaddr, - ipv6_spec->hdr.src_addr, 16); - rte_memcpy(filter->dst_ipaddr, - ipv6_spec->hdr.dst_addr, 16); + memcpy(filter->src_ipaddr, ipv6_spec->hdr.src_addr, + 16); + memcpy(filter->dst_ipaddr, ipv6_spec->hdr.dst_addr, + 16); if (!bnxt_check_zero_bytes(ipv6_mask->hdr.src_addr, 16)) { - rte_memcpy(filter->src_ipaddr_mask, - ipv6_mask->hdr.src_addr, 16); + memcpy(filter->src_ipaddr_mask, + ipv6_mask->hdr.src_addr, 16); en |= !use_ntuple ? 0 : NTUPLE_FLTR_ALLOC_INPUT_EN_SRC_IPADDR_MASK; } if (!bnxt_check_zero_bytes(ipv6_mask->hdr.dst_addr, 16)) { - rte_memcpy(filter->dst_ipaddr_mask, - ipv6_mask->hdr.dst_addr, 16); + memcpy(filter->dst_ipaddr_mask, + ipv6_mask->hdr.dst_addr, 16); en |= !use_ntuple ? 0 : NTUPLE_FLTR_ALLOC_INPUT_EN_DST_IPADDR_MASK; } @@ -591,8 +593,8 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr, return -rte_errno; } - rte_memcpy(((uint8_t *)&tenant_id_be + 1), - vxlan_spec->hdr.vni, 3); + memcpy(((uint8_t *)&tenant_id_be + 1), + vxlan_spec->hdr.vni, 3); filter->vni = rte_be_to_cpu_32(tenant_id_be); filter->tunnel_type = @@ -645,8 +647,8 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr, "Invalid TNI mask"); return -rte_errno; } - rte_memcpy(((uint8_t *)&tenant_id_be + 1), - nvgre_spec->tni, 3); + memcpy(((uint8_t *)&tenant_id_be + 1), + nvgre_spec->tni, 3); filter->vni = rte_be_to_cpu_32(tenant_id_be); filter->tunnel_type = -- 2.43.0