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 A98B0A0C43; Fri, 15 Oct 2021 21:24:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 19A7240041; Fri, 15 Oct 2021 21:24:34 +0200 (CEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mails.dpdk.org (Postfix) with ESMTP id 8E39E41135 for ; Fri, 15 Oct 2021 21:24:30 +0200 (CEST) Received: by mail-wm1-f49.google.com with SMTP id z2so3306325wmc.3 for ; Fri, 15 Oct 2021 12:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zydfmozSalBvlAsly9uTw9HG8rampkoewT9vpJ5vDaY=; b=S9j+wqCEvlgfpTBVEbdcb8nk5bTNZi+l0oTB6RJkbmvBOHzxS7ReNi722iBLZN94L/ BJbpelBg0UsoiRG5jT6iY/PUjEnRzSsiaWG3utIztOpROJI/m1RsSe4cn/8VsQLIe67i QsEIsKctJPZbOVpb6gQeNG3lV4tmR+gHu95W6y3F3z1+MheJFSicKcfHVCEdVEaPhVNx 13haBYYXw2nqSYh4BAaentMl01DEVJBRx1g6k5t1bCEj0/uD0546S15WsrARV7eErpSr iwYWL6cjo6Ok1oRM36c31tze6G0xyshlOzrArNUwlPfyXxlXrjHNM8sFFpLEO16Zx5Ox eYSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zydfmozSalBvlAsly9uTw9HG8rampkoewT9vpJ5vDaY=; b=6snZHiWVnfcguvG+WLMqiS/S52E7fOEjolfwwiqfNpVLROPZh2BTxWqaFnMKCAPMt9 B7nzuuyIn+CWxTUyKQYOtCAVOjXIDzUtQJukM/vpdjgnrwQi5XaYcq5CdPhuuQRafGJp oC6XCj6jKmBK5LUjDs3AiJotcugMxVXrbpUAIutpawyl1s389nEcMzPAkdzhQhQY0qbt ih3GB+nHWFkbbBtAhzYfFtZrb7jwyYzDFHzYmD+K3MJ+TfBFQMd8T3QbDhIBq5hTmPg7 sKROqO3csCbNqhbeCpSt1iz3fqFiGp2zEEdAnLCKny1zSPqdwUUuAaaqqk+yQGMZBmT0 2NWw== X-Gm-Message-State: AOAM532NjHC7jXCTk6eXYCU/OFbdxV8ptBqLHgMC/Mq0PloD3FrtTrmR 4MlU+XGDuWNw0sr7iMREdIxLJj2CkDGX/PZC X-Google-Smtp-Source: ABdhPJxdwq3jcGCV14qHkdKOfsODvL15OSgUd+KDHEt9vuW+qP2iQQG3sFNesecbPbgMt0SOZ9I4jQ== X-Received: by 2002:a05:600c:892:: with SMTP id l18mr14536971wmp.89.1634325870354; Fri, 15 Oct 2021 12:24:30 -0700 (PDT) Received: from gojira.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id s186sm6335862wme.14.2021.10.15.12.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 12:24:30 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Cc: David Marchand Date: Fri, 15 Oct 2021 21:24:07 +0200 Message-Id: <20211015192408.21798-4-olivier.matz@6wind.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211015192408.21798-1-olivier.matz@6wind.com> References: <20210929214817.18082-1-olivier.matz@6wind.com> <20211015192408.21798-1-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 3/4] cocci: add cocci script to rename mbuf offload flags 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 Sender: "dev" The mbuf offload flags do not match the DPDK namespace (they are not prefixed by RTE_). This coccinelle script is used in the next commit to do the replacement in the code. A draft script was initially submitted in commit d7595795b760 ("doc: announce renaming of mbuf offload flags"), but dropped by mistake at commit. Link: http://inbox.dpdk.org/dev/20210730155700.32574-1-olivier.matz@6wind.com Signed-off-by: Olivier Matz --- .../cocci/prefix_mbuf_offload_flags.cocci | 441 ++++++++++++++++++ 1 file changed, 441 insertions(+) create mode 100644 devtools/cocci/prefix_mbuf_offload_flags.cocci diff --git a/devtools/cocci/prefix_mbuf_offload_flags.cocci b/devtools/cocci/prefix_mbuf_offload_flags.cocci new file mode 100644 index 0000000000..cac83032b4 --- /dev/null +++ b/devtools/cocci/prefix_mbuf_offload_flags.cocci @@ -0,0 +1,441 @@ +// +// Rename mbuf offload flags (and some other defines) to have +// an RTE_ prefix. +// This only replaces usages in C code, so it is advised to +// replace missing occurences with: +// for f in $(git ls-tree --full-tree -r --name-only HEAD); do +// if [ "$(file -b --mime-encoding $f)" = "binary" ]; then +// continue +// fi +// sed -i \ +// -e 's,EXT_ATTACHED_MBUF,RTE_MBUF_F_EXTERNAL,g' \ +// -e 's,IND_ATTACHED_MBUF,RTE_MBUF_F_INDIRECT,g' \ +// -e 's,EXT_ATTACHED_MBUF,RTE_MBUF_F_EXTERNAL,g' \ +// -e 's,PKT_FIRST_FREE,RTE_MBUF_F_FIRST_FREE,g' \ +// -e 's,PKT_LAST_FREE,RTE_MBUF_F_LAST_FREE,g' \ +// -e 's,PKT_TX_DYNF_METADATA,RTE_MBUF_DYNFLAG_TX_METADATA,g' \ +// -e 's,PKT_RX_DYNF_METADATA,RTE_MBUF_DYNFLAG_RX_METADATA,g' \ +// -e 's,\