From patchwork Sat Nov 19 02:55:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 23188 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp533713wrr; Fri, 18 Nov 2022 19:09:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf4elRI18y4F1Tn6TeW5l1udKhnkMh7HpX8RP0WPTkx68nPAhYnt0IZjkHj7FvjPjMOdJMmt X-Received: by 2002:aa7:c844:0:b0:461:a130:ea3c with SMTP id g4-20020aa7c844000000b00461a130ea3cmr8174630edt.272.1668827354626; Fri, 18 Nov 2022 19:09:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668827354; cv=none; d=google.com; s=arc-20160816; b=nJE3apdzNepjqqt9mw0Nh+VE/4v66YXWDdsjY2wyo+Ob4tKFDtSdp0Ck+EmL+TPWy+ Jyz6pSzx468LJtnItw2jmIt4WZulRGJGUgcltCY3hGNpl9vrj4r6gd5vgJ0t008e4vc8 WIfB+E9D5NGk+vMiyy67/YWNA7/Y6NOcx5hGB5LrFX/ZuRyugAyRL8OX4R0hwPKgRyGT 10O4B+5+pspzJpjhV+2LYrwFQfdYAeKicXT29BbZJudL1SZpwMqzgYinUo+dsZluviGj A4Ed009Df5GONM4POcSaxNR5lPya4S5Kt46pdUutoKRFOJO3Ti4+juZXI3KXZ+ysUi0C CP9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=oDXvPcgMNTUCdVA8kd/5tskIPDzgpH34JjiNJNvKQtE=; b=OTpmjlOYEk48qsKjIIjoWF7uMRn0bG5DYKK5nGpkJjrXCIUIa32jXRSAuSgRq1ZtW4 OL5zeYnRARO8Di7G4uzwuo06ghbSUZIxgaeadz8OIqicY0S0DczhObNyXvrIq0D9ATLi DInbiKq2Fgg77vURUB7w2fEmO6O3QVj+gj4F9myWzzmoGcItGDLynY2fOZiVzgCvKEHl QJHZCmgYvPCqssf1z6OdzZY+UdWW9aZmHhl1HSeoQTXvrZJWcxGvc9A58SpqLRldQ6jG J4jBgsKj14/7O40+xtkgJdh7QJOiK/AXeryHwTTjDOnkntSN18D10aoNzJo2wznshxTr i/0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji15-20020a170907980f00b007417c6edb0asi4288501ejc.402.2022.11.18.19.08.51; Fri, 18 Nov 2022 19:09:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230118AbiKSCzY (ORCPT + 99 others); Fri, 18 Nov 2022 21:55:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbiKSCzV (ORCPT ); Fri, 18 Nov 2022 21:55:21 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 68286950CC; Fri, 18 Nov 2022 18:55:18 -0800 (PST) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8BxXbeVRXhjfMoIAA--.15473S3; Sat, 19 Nov 2022 10:55:17 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxPuCTRXhjEsQWAA--.60010S2; Sat, 19 Nov 2022 10:55:15 +0800 (CST) From: Tiezhu Yang To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jesper Dangaard Brouer Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] samples: pktgen: Use "grep -E" instead of "egrep" Date: Sat, 19 Nov 2022 10:55:04 +0800 Message-Id: <1668826504-32162-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf8AxPuCTRXhjEsQWAA--.60010S2 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvdXoWruFWrur1kGFy3Gr1fGF4kJFb_yoWkZwc_Gr yfX3Z8J3yUXr1akr4UCayvyF4vk3srGFWrGrWFgrn8Ca4ay3y3AFZxGFyUC3W5Ww47uFWa 9a1kXw1rCw17tjkaLaAFLSUrUUUU1b8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrn0 xqx4xG64xvF2IEw4CE5I8CrVC2j2Jv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUY q7kC6x804xWl14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3w AFIxvE14AKwVWUXVWUAwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK 6xIIjxv20xvE14v26r1I6r4UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r1j6r4UM28EF7 xvwVC2z280aVAFwI0_Cr0_Gr1UM28EF7xvwVC2z280aVCY1x0267AKxVW8JVW8Jr1ln4kS 14v26r1Y6r17M2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv 67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2 Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xFxVAFwI0_Jrv_JF1lx2IqxVAq x4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r 1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF 7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxV W8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU 4s2-UUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749892311893114686?= X-GMAIL-MSGID: =?utf-8?q?1749892311893114686?= The latest version of grep claims the egrep is now obsolete so the build now contains warnings that look like: egrep: warning: egrep is obsolescent; using grep -E fix this up by moving the related file to use "grep -E" instead. sed -i "s/egrep/grep -E/g" `grep egrep -rwl samples/pktgen` Here are the steps to install the latest grep: wget http://ftp.gnu.org/gnu/grep/grep-3.8.tar.gz tar xf grep-3.8.tar.gz cd grep-3.8 && ./configure && make sudo make install export PATH=/usr/local/bin:$PATH Signed-off-by: Tiezhu Yang --- samples/pktgen/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/pktgen/functions.sh b/samples/pktgen/functions.sh index 9331942..dd4e53a 100644 --- a/samples/pktgen/functions.sh +++ b/samples/pktgen/functions.sh @@ -191,7 +191,7 @@ function extend_addr6() fi # if shrink '::' occurs multiple, it's malformed. - shrink=( $(egrep -o "$sep{2,}" <<< $addr) ) + shrink=( $(grep -E -o "$sep{2,}" <<< $addr) ) if [[ ${#shrink[@]} -ne 0 ]]; then if [[ ${#shrink[@]} -gt 1 || ( ${shrink[0]} != $sep2 ) ]]; then err 5 "Invalid IP6 address: $1"