[ovs-discuss] Test OVS kernel module using only one machine

Ahmed Talha Khan auny87 at gmail.com
Tue Dec 18 14:40:56 UTC 2012


Ok cool. So then if i do :

tcpreplay -i port0 pcap

this traffic will be accepted by ovs as "ingrees" traffic on port0 even
when tcpreplay is out-bound replay on an interface?


On Tue, Dec 18, 2012 at 7:34 PM, Kyle Mestery (kmestery) <kmestery at cisco.com
> wrote:

> On Dec 18, 2012, at 8:30 AM, Ahmed Talha Khan <auny87 at gmail.com> wrote:
> >
> > How do i use them if they are not on the host? I mean these are not
> eth0/eth1 type actual interfaces, so how will they be visible on the host
> until i make some device myself? How do you propose that I add the port.
> >
>
> The easiest way is this:
>
> ovs-vsctl add-port br0 port0  --  set  Interface  port0 type=internal
>
> In that example, you will see a "port0" interface if you do "ifconfig
> port0". Create another one (port1 maybe) and you can then run your tests on
> those ports, once you do "ifconfig port0/port1 up".
>
> >
> > On Tue, Dec 18, 2012 at 7:22 PM, Kyle Mestery (kmestery) <
> kmestery at cisco.com> wrote:
> > On Dec 18, 2012, at 8:19 AM, Ahmed Talha Khan <auny87 at gmail.com> wrote:
> > >
> > > I am not aware of the internal port functionality. Can you kindly
> elaborate your answer a bit more. Also what do you mean by "add IP
> configuration on your bridge port"? How will that help in sending traffic
> in?
> > >
> > Internal ports are internal ports created in OVS on the bridge. You can
> use them on the host itself for different purposes, one of which is you can
> apply IP configuration onto them. For the VXLAN testing I did, I would use
> this functionality, for example. If you test does not require IP, then just
> configure the port up and send traffic into it. Add another internal port
> to receive the traffic on.
> >
> > >
> > > On Tue, Dec 18, 2012 at 7:14 PM, Kyle Mestery (kmestery) <
> kmestery at cisco.com> wrote:
> > > On Dec 18, 2012, at 7:58 AM, Ahmed Talha Khan <auny87 at gmail.com>
> wrote:
> > > > Hey Ben,Jesse,Kyle,ALL,
> > > >
> > > > I made some changes in the kernel module and would like to test
> them. Ideally I would want to test it on a single machine that i am on
> without firing up other vms(eg kvm/qemu integration). I would like to know
> what is the preferred method used by the community for this.
> > > >
> > > > I thought of using a combination of tcpreplay and TAP devices to
> achieve this. I only want send traffic into ovs-port 1, receive it in the
> kernel mod, and send it out to  ovs-port 2 after doing my processing.
>  Since I was trying to use tcpreplay,which is an out-bound utility(sends
> traffic out of the stack), I need to make some interface on which i replay
> this traffic. I made a TAP interface for this, since that can be used to
> inject packets into the network stack. The problem is that when i replay
> the traffic on this TAP device it is not received inside OVS obviously
> because the TAP device only sends up the traffic to kernel but ovs will not
> receive it since it  is not coming form any OVS port.
> > > >
> > > > Then there is a way to make 2 TAP devices, bridge them, play traffic
> on one of them and add the 2nd one to ovs. But that is not possible since
> OVS and linux bridge module cannot co-exist.
> > > >
> > > > So the questions is how to input traffic into ports, in a
> non-programmatic way, without external vms.
> > > >
> > > > Also, are there any tests in the /test directory to test the
> datapath functionality independent of the userland ovs code?
> > > >
> > > I usually just use OVS internal ports for this. Either add IP
> configuration on your bridge port itself, or just create another internal
> port and use that for your tests.
> > >
> > > Thanks,
> > > Kyle
> > >
> > > >
>
>
>
>


-- 
Regards,
-Ahmed Talha Khan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20121218/96ad5a21/attachment.html>


More information about the discuss mailing list