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 74268A0032; Wed, 29 Sep 2021 23:49:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E53AE41104; Wed, 29 Sep 2021 23:49:45 +0200 (CEST) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mails.dpdk.org (Postfix) with ESMTP id 6013D410EA for ; Wed, 29 Sep 2021 23:49:42 +0200 (CEST) Received: by mail-wr1-f45.google.com with SMTP id w29so6577694wra.8 for ; Wed, 29 Sep 2021 14:49:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=zydfmozSalBvlAsly9uTw9HG8rampkoewT9vpJ5vDaY=; b=Kn9gu9dQGbfL//3ve67od/xFRGgnOg0eG5xHXw84OTjrT1lfAf6i7kk2TEcVlLKumC HrjEdBTajz5A4jjVnF+U4PnxiP7kDcG8MRTJ+TFJbnXIB2rKyTYDtBwESrpXTpEsuIMV udvRtT+H3qyFPNpj6mQBoWaFVfjOIHpPkObrDVNhI0cLWdQvL8iBOV0egd8DtKOUtOR/ W6uMSWuNnjXFXvkeUGbISWT9Pvdt8LVcA4tVDOcrZN8lIlOolx0C1Ns6rQOOpIUpCUl+ lRNYTEbDOTsx+4OBPXBcf85oFaDmA1uSzaYdJmkqNsGsUT1TxVP+McgcCoHkzDvmUEFu 0GcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zydfmozSalBvlAsly9uTw9HG8rampkoewT9vpJ5vDaY=; b=nCtHEmaGh7gk9nd0bLQlV8dz5mCeVm7n55yAk/eRHEBHG23UTb/eDVjqJ8aVZncYX2 bp3elS46G6rIG7tr4Ih8mdNZFZTmVHXQ7dqsIhB1Q/LnkZHOfdl5f4ilfZ/qiwNas9lz BorALHWnUfQA3Z0o9/W8q90DpPq/QLmXxn8cBek4VvcthAoNeYNJcJcCRDekhlmFgwM/ gDvYL8Nar3cOJEhzrq1o06qx0GOmkde5NaZeXHaQ4vcP7/C9LnJ2Kd4K/FhEcg7SyjkQ pUi1kFazVVtfMPTAMaEJAKZlxv/5HQQViOPkIBFxRTUvolVPCCQTIFJ4/X/il84bFAzW AD+g== X-Gm-Message-State: AOAM532Fh6udvmeAyYXJl9kd404+7+ESX+I8uAOIdVxlofG0yQ9CDAAa EYbv46FszlTOpGO9M20Su+JCHKe01MptGg== X-Google-Smtp-Source: ABdhPJxHW8ScLsTl9Avlm67Zmc9HbjfwzrWEkqPjksAo0kGZfQgv8F9/3CYlrRG/D0min9+GAcIdMw== X-Received: by 2002:adf:dc90:: with SMTP id r16mr2532774wrj.221.1632952182141; Wed, 29 Sep 2021 14:49:42 -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 w17sm884561wmi.42.2021.09.29.14.49.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 14:49:41 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Date: Wed, 29 Sep 2021 23:48:16 +0200 Message-Id: <20210929214817.18082-3-olivier.matz@6wind.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210929214817.18082-1-olivier.matz@6wind.com> References: <20210929214817.18082-1-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 2/3] 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,\