From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pz0-f201.google.com (mail-pz0-f201.google.com [209.85.222.201]) by ozlabs.org (Postfix) with ESMTP id 4CF18B7BF5 for ; Thu, 24 Dec 2009 06:01:26 +1100 (EST) Received: by pzk39 with SMTP id 39so3341714pzk.15 for ; Wed, 23 Dec 2009 11:01:25 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <12604cb0912231058k58589125s14cfbf5e287c9fe2@mail.gmail.com> References: <12604cb0912231057n2282ed22r45dd3c9c57ce8b02@mail.gmail.com> <12604cb0912231058k58589125s14cfbf5e287c9fe2@mail.gmail.com> From: Sivaguru Perambalam Date: Wed, 23 Dec 2009 12:01:05 -0700 Message-ID: <12604cb0912231101o2648fe62v64c85be1e8fadcc0@mail.gmail.com> Subject: Problem setting up pktgen To: linuxppc-dev@ozlabs.org Content-Type: multipart/alternative; boundary=00504502cc2bfa4564047b69f272 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --00504502cc2bfa4564047b69f272 Content-Type: text/plain; charset=ISO-8859-1 > > > Hello , > > I want to use pktgen to do some UDP tests . > So I figured out that pktgen is built in the kernel I am using (2.6.32) and > tried to use the bash script given in the internet . > > Script : > > #! /bin/sh > rmmod pktgen > cd /usr/src/kernels/linux-2.6.32/net/core > insmod pktgen.ko > > PGDEV=/proc/net/pktgen/pg0 > function pgset() { > local result > echo $1 > $PGDEV > result=`cat $PGDEV | fgrep "Result: OK:"` > if [ "$result" = "" ]; then > cat $PGDEV | fgrep Result: > fi > } > > function pg() { > echo inject > $PGDEV > cat $PGDEV > } > > pgset "odev eth0" > pgset "dst 1.1.1.3" > > > I get the following error message : > > ./ipg: line 11: /proc/net/pktgen/pg0: No such file or directory > cat: /proc/net/pktgen/pg0: No such file or directory > cat: /proc/net/pktgen/pg0: No such file or directory > ./ipg: line 11: /proc/net/pktgen/pg0: No such file or directory > cat: /proc/net/pktgen/pg0: No such file or directory > cat: /proc/net/pktgen/pg0: No such file or directory > > I am running this as the 'root' user. > I don't understand how exactly pktgen is informed about > the Ethernet interfaces on the system. > > This is what I get for ls /proc/net/pktgen/ , > kpktgend_0 kpktgend_1 kpktgend_2 kpktgend_3 kpktgend_4 kpktgend_5 > kpktgend_6 kpktgend_7 pgctrl > > > Please let me know , what is going wrong. > > Thanks ! > > > > > --00504502cc2bfa4564047b69f272 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Hello ,

I want to= use pktgen to do some UDP tests .
So I figured out that pktgen is built in the kernel I am using (2.6.32= ) and tried to use the bash script given in the internet .

Script :

#! /bin/sh
rmmo= d pktgen
cd /usr/src/kernels/linux-2.6.32/net/core
insm= od pktgen.ko

PGDEV=3D/proc/net/pktgen/pg0
function pgset() {
=A0=A0 =A0local result
=A0=A0 =A0ech= o $1 > $PGDEV
=A0=A0 result=3D`cat $PGDEV | fgrep "Result= : OK:"`
=A0=A0 =A0if [ "$result" =3D "" = ]; then
=A0=A0 =A0 =A0 =A0 cat $PGDEV | fgrep Result:
=A0=A0 =A0fi
}

function pg() {
=A0=A0 =A0echo inject > $PGDEV
=A0=A0 =A0cat $PGDEV
}

pgset "odev eth0"
pgse= t "dst 1.1.1.3"


I get the following error message = :

./ipg: line 11: /proc/net/pktgen/pg0: No su= ch file or directory
cat: /proc/net/pktgen/pg0: No such file or d= irectory
cat: /proc/net/pktgen/pg0: No such file or directory
./ipg: = line 11: /proc/net/pktgen/pg0: No such file or directory
cat: /pr= oc/net/pktgen/pg0: No such file or directory
cat: /proc/net/pktge= n/pg0: No such file or directory

I am running this as the 'root' user.=A0<= /div>
I don't understand how exactly pktgen is informed about the= =A0Ethernet=A0interfaces on the system.

This is wh= at I get for=A0=A0ls /proc/net/pktgen/=A0,
kpktgend_0 =A0kpktgend_1 =A0kpktgend_2 =A0kpktgend_3 =A0kpktgend_4 =A0= kpktgend_5 =A0kpktgend_6 =A0kpktgend_7 =A0pgctrl

<= br>
Please let me know , what is going wrong.

Thanks !





--00504502cc2bfa4564047b69f272--