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 C724643BAE; Fri, 1 Mar 2024 00:07:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C2BAA43423; Fri, 1 Mar 2024 00:01:50 +0100 (CET) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mails.dpdk.org (Postfix) with ESMTP id A9FD14029E for ; Fri, 1 Mar 2024 00:00:47 +0100 (CET) Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-299b818d63aso1190410a91.0 for ; Thu, 29 Feb 2024 15:00:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709247647; x=1709852447; 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=2zyJrtZo/udH4i5F0Htc3LaXGCVF+SDLuHE372SKhB1VwXOcAL4nFf8PW6b6UUQteH uYxu158Znt9BHacNxnBYwEs2BAiCBreyUNW9nNNdP2gj2rkvd//rU8XFzqWlUWih8BTM 8C/+fBMGgkos74kIfLpvJ+3O7OVj3NN+a+VAoHbyXB2+rNjaBSdF4IaKDx5YP1HpU5Ig 4m09u8FLwogGS97agneFrappk095mD6Cn2srB6IvJO7JByKNFjlEXpmioMdTIVFLgWTy n83e8GswCWKFUoIrj/SNHAVpTBdG+ybPxdjxAHu7cyHazr3rv0rQolcr8CFwOz9yWsMF BDyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709247647; x=1709852447; 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=u7fdb0yWwUZDHVf2/qin1AeGzF+PmaWv0MOC/8i4D4XrXt18wn0e8Y1W6iXWBEhMYt u+amTgoIQuZVHN9qeqTDLjufvSNw/DDXrclYH1oq+znqLU4GidiZyzvoI0zGwBjlluZo SKBNZ7vtB5QD61KjrJOJvbs5vA8RdpQZzvLRqTOcdaL4n+f1BKCBSaSzjCszJDW4NyGE EZyFm/bd/mwN2FHK0IMv+XJj5HA5lQiYq6SQMXoH2qWbaAO9XDHxP2mND81SPExVkLaw CAM4SpJz091GwPPviIjGsdSt4icH62vBoA50foFB0DOlDjLXR5H5WjdTHsHDqp/PGwlz NjMw== X-Gm-Message-State: AOJu0Yx7DnCuTyFcoSRah/jf+KPkrb+K1tij0RUuRyDOqNB6FFw5INx6 JV9coyZ3AuriqIC0BAIMlz3g+G4J1Qd6wizmJa68CXlysCw8hptllDeLZkSRZaWJPi8z3x0GAT6 e X-Google-Smtp-Source: AGHT+IFbkqfFXr+gPLz1AfGJWZ8GHWXUmU5xzGcUYN5lfd7ky7Auz984T1zz59A7KS+L0oquOS3FDQ== X-Received: by 2002:a17:90a:6047:b0:296:f2d5:6567 with SMTP id h7-20020a17090a604700b00296f2d56567mr441226pjm.4.1709247646812; Thu, 29 Feb 2024 15:00:46 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id l22-20020a17090b079600b0029a8e5355fcsm1965578pjz.53.2024.02.29.15.00.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 15:00:46 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ajit Khaparde , Somnath Kotur Subject: [PATCH 55/71] net/bnxt: replace use of fixed size rte_memcpy Date: Thu, 29 Feb 2024 14:58:42 -0800 Message-ID: <20240229225936.483472-56-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240229225936.483472-1-stephen@networkplumber.org> References: <20240229225936.483472-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