Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp800928imm; Mon, 9 Jul 2018 10:52:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdVuouRfTwJkkdamxeYgexAEB8FoUkWcEXPiBhgqPoFfyQU2nEd2Or3wLVeJDTIJWaeiQiY X-Received: by 2002:a62:229a:: with SMTP id p26-v6mr4490081pfj.53.1531158748020; Mon, 09 Jul 2018 10:52:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531158747; cv=none; d=google.com; s=arc-20160816; b=o8wqTSpiFjVPP+Unb2K8FKjFUmGNEkx8A1OPILd5SmZqgotdGAOHri+9o7vZ6cqpAn sxmbeXlTf4vXmJeUy6+hKJeL1tvB42XnQ7yRUkxohcBLM8R1UQXg3O9omSOisuTf+kQK 6RpTomW2/QYsB4Q1Gu0+4Mx0/r/Btk2x0q/BU6V5jtd9QHreFQqBEdjISn/YPUvr4Myg vO3y9CxxOAzRkzxC4WXFvhxGCFkt4MfyTmQfTjkodBhA4oF69NvC59PxUd+BbRoQNqSN +GaNYX5OfID9hWVdJaQyatMUvaCKvme4aDEY9RzGb3zy9O6gpgr0pCpeMgy3ueZ8ixFn Qa+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=hW1IQUa9XOL1Qfkgap14X+CyFZl8YayNmPJPvKVxkdw=; b=lz5zncs3nGCHySdawv62jtQxVZerLY7NPyIuFk0EM/pFjgkONuO9DA1Ig6hBHf7HsK nZtvZKbC2hYPaIiy6mpte+IWSWnxr3a9WfM9xyP3ee2wkupjfdSncaUsAix03OfVK4TO BuPFBzybBsNyqkaffmewruZaU3CgKNKD2CuBxlrZM5oDlXs0YQSiJd06Ch3dFFF+EE1L wTHJKKq1qqySFeqkHOnHrcwUwGOdq1nXvKy3RigCKaTKU5Z4m7MlzvAYaWOCTYOLYtVN JXzm76H3w/MgsEMz8b6TxXbLVJ4/O64KDARbtr5zQBEWd+S7P9AgfAY+6KpUOgl3NO4c ZKfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bLi3bX8g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q28-v6si7588688pgm.362.2018.07.09.10.52.12; Mon, 09 Jul 2018 10:52:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bLi3bX8g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933867AbeGIRvc (ORCPT + 99 others); Mon, 9 Jul 2018 13:51:32 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36381 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933692AbeGIRvb (ORCPT ); Mon, 9 Jul 2018 13:51:31 -0400 Received: by mail-pf0-f194.google.com with SMTP id u16-v6so14177701pfh.3; Mon, 09 Jul 2018 10:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=hW1IQUa9XOL1Qfkgap14X+CyFZl8YayNmPJPvKVxkdw=; b=bLi3bX8gREDCrKQeWj/HfuFSvxg/1ELQO1XLcfPvk3JWKwPRbZki+UuUFvBKziWM80 H2Dl30hL6IlyFJN2EvYm4M6YeeBEQysoKWT3+BvgIS2/XaXwgfaJ7116QDtT1dtVqnk+ J6Rc3xWV4F7FPGAtRwesEPvo85Uw4Rpz1GrdyikCDJO9SjN4EA0hFlQlX2lShCuYAlut aT9b4Ys9NZM7vJKxmCVb2Iyy8TjARpRJW075JjXMqUXbfSwRoEaapXqwnmvv2vwz+NHZ S9b+g85/cw1zckBAKj3mwl4eGBRMMVo3RFf0w+AAiHCiiyVGls/W7cpri9MMpP7CGCm9 WvQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hW1IQUa9XOL1Qfkgap14X+CyFZl8YayNmPJPvKVxkdw=; b=jssuYrERzSA1ec2hTuc3eKpR8iBQZgKqLzojJN5k7FojMfL/XFkf6Tch0oELjZx/mR i0JDHYFX1hhjQndIDCPYDBCSiVeW5RaV2loe2RYx2KjOiT7m2FfOmJHSfkDYUMd6STBn G5Psrts4VluLH0hxVh5nevFMBX8wbXiRd9uvP9lxw3L6ixTZ8oScQn/jQKd7VV5JxWSp KIn7eHQlBKXgQcuHnCcZm/oJza/SFgTfIRmSodMp1LQo2kcD8shy27WXLdW73niLmS6O AbBLC55PjHxlW80th57jwtNHYOLT0YzN7VCrhG3HE5c6TzIxikqMzeEPn5mfWyMugvL1 s7Bw== X-Gm-Message-State: APt69E2PA2MQjmvGhAv/9Vk7zedqx93eeuglxo9j/CMpngb+RepUle/m A7LcBT2kT9W3plEDpeRdkV0= X-Received: by 2002:a63:7f16:: with SMTP id a22-v6mr19720262pgd.255.1531158690393; Mon, 09 Jul 2018 10:51:30 -0700 (PDT) Received: from localhost.localdomain ([211.196.191.92]) by smtp.gmail.com with ESMTPSA id y13-v6sm14926862pfi.131.2018.07.09.10.51.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 10:51:29 -0700 (PDT) From: Taeung Song To: Alexei Starovoitov , Daniel Borkmann Cc: Jesper Dangaard Brouer , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Taeung Song Subject: [PATCH v2] samples/bpf: Fix tc and ip paths in xdp2skb_meta.sh Date: Tue, 10 Jul 2018 02:51:21 +0900 Message-Id: <20180709175121.3355-1-treeze.taeung@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The below path error can occur: # ./xdp2skb_meta.sh --dev eth0 --list ./xdp2skb_meta.sh: line 61: /usr/sbin/tc: No such file or directory So just use command names instead of absolute paths of tc and ip. In addition, it allow callers to redefine $TC and $IP paths Fixes: 36e04a2d78d9 ("samples/bpf: xdp2skb_meta shows transferring info from XDP to SKB") Reviewed-by: Jesper Dangaard Brouer Signed-off-by: Taeung Song --- samples/bpf/xdp2skb_meta.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/bpf/xdp2skb_meta.sh b/samples/bpf/xdp2skb_meta.sh index b9c9549c4c27..4bde9d066c46 100755 --- a/samples/bpf/xdp2skb_meta.sh +++ b/samples/bpf/xdp2skb_meta.sh @@ -16,8 +16,8 @@ BPF_FILE=xdp2skb_meta_kern.o DIR=$(dirname $0) -export TC=/usr/sbin/tc -export IP=/usr/sbin/ip +[ -z "$TC" ] && TC=tc +[ -z "$IP" ] && IP=ip function usage() { echo "" @@ -53,7 +53,7 @@ function _call_cmd() { local allow_fail="$2" shift 2 if [[ -n "$VERBOSE" ]]; then - echo "$(basename $cmd) $@" + echo "$cmd $@" fi if [[ -n "$DRYRUN" ]]; then return -- 2.17.1