Re: [ovs-discuss] Help regarding patching OVS

2018-04-02 Thread Taimur Hafeez
Dear,
I patched OVS successfully but when I issue "make" command it gives
following error:

taimur@ubuntuibm:~/openvswitch-2.6.0$ make
make  all-recursive
make[1]: Entering directory `/home/taimur/openvswitch-2.6.0'
Making all in datapath
make[2]: Entering directory `/home/taimur/openvswitch-2.6.0/datapath'
Making all in linux
make[3]: Entering directory `/home/taimur/openvswitch-2.6.0/datapath/linux'
make -C /lib/modules/4.4.0-31-generic/build
M=/home/taimur/openvswitch-2.6.0/datapath/linux
modules
make[4]: Entering directory `/usr/src/linux-headers-4.4.0-31-generic'
  CC [M]  /home/taimur/openvswitch-2.6.0/datapath/linux/actions.o
In file included from /home/taimur/openvswitch-2.6.0
/datapath/linux/actions.c:24:0:
/home/taimur/openvswitch-2.6.0/datapath/linux/compat/include/linux/openvswitch.h:443:2:
error: unknown type name ‘ovs_be16’
  ovs_be16 rwnd;
  ^
make[5]: *** [/home/taimur/openvswitch-2.6.0/datapath/linux/actions.o]
Error 1
make[4]: *** [_module_/home/taimur/openvswitch-2.6.0/datapath/linux] Error 2
make[4]: Leaving directory `/usr/src/linux-headers-4.4.0-31-generic'
make[3]: *** [default] Error 2
make[3]: Leaving directory `/home/taimur/openvswitch-2.6.0/datapath/linux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/taimur/openvswitch-2.6.0/datapath'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/taimur/openvswitch-2.6.0'
make: *** [all] Error 2

Could any body help on this? Thanks!

On Thu, Mar 29, 2018 at 7:36 PM, Taimur Hafeez 
wrote:

> thanks dear. Though i had a small issue with patch file too, however,
> after mitigating that issue, Yes it worked by issuing following command in
> the top-level source directory of ovs:
> ~/openvswitch-2.6.0$ patch -p1 
> Regards,
> Taimur
>
> On Mon, Mar 26, 2018 at 7:22 PM, Mark Michelson 
> wrote:
>
>> If you are at the top-level source directory of ovs, then you should add
>> '-p1' to the patch command.
>>
>>
>> On 03/24/2018 07:45 AM, Taimur Hafeez wrote:
>>
>>> Dear All,
>>> I have got the patch for some modifications in TCP header in OVS.
>>> Unfortunately, I am unable to patch it with OVS with patch command. I have
>>> tried on different OVS and Ubuntu versions. The error I always get in
>>> Terminal is mentioned below:
>>>
>>> ubuntu@sdnhubvm:~/openvswitch$ patch -t <  tcp_rwnd.diff
>>> can't find file to patch at input line 5
>>> Perhaps you should have used the -p or --strip option?
>>> The text leading up to this was:
>>> --
>>> |diff --git a/datapath/linux/compat/include/linux/openvswitch.h
>>> b/datapath/linux/compat/include/linux/openvswitch.h
>>> |index 12260d8..dd84b04 100644
>>> |--- a/datapath/linux/compat/include/linux/openvswitch.h
>>> |+++ b/datapath/linux/compat/include/linux/openvswitch.h
>>> --
>>> No file to patch.  Skipping patch.
>>> 2 out of 2 hunks ignored
>>> can't find file to patch at input line 33
>>> Perhaps you should have used the -p or --strip option?
>>> The text leading up to this was:
>>> --
>>> |diff --git a/include/openvswitch/flow.h b/include/openvswitch/flow.h
>>> |index df80dfe..64da205 100644
>>> |--- a/include/openvswitch/flow.h
>>> |+++ b/include/openvswitch/flow.h
>>> --
>>> No file to patch.  Skipping patch.
>>> 2 out of 2 hunks ignored
>>> can't find file to patch at input line 57
>>> Perhaps you should have used the -p or --strip option?
>>> The text leading up to this was:
>>> --
>>> |diff --git a/include/openvswitch/ofp-actions.h
>>> b/include/openvswitch/ofp-actions.h
>>> |index 74e9dcc..a7512e5 100644
>>> |--- a/include/openvswitch/ofp-actions.h
>>> |+++ b/include/openvswitch/ofp-actions.h
>>> --
>>> No file to patch.  Skipping patch.
>>> 2 out of 2 hunks ignored
>>> can't find file to patch at input line 87
>>> Perhaps you should have used the -p or --strip option?
>>> The text leading up to this was:
>>> --
>>> |diff --git a/lib/odp-execute.c b/lib/odp-execute.c
>>> |index 65a6fcd..b052f1c 100644
>>> |--- a/lib/odp-execute.c
>>> |+++ b/lib/odp-execute.c
>>> --
>>> No file to patch.  Skipping patch.
>>> 2 out of 2 hunks ignored
>>> can't find file to patch at input line 122
>>> Perhaps you should have used the -p or --strip option?
>>> The text leading up to this was:
>>> --
>>> |diff --git a/lib/odp-util.c b/lib/odp-util.c
>>> |index 626a82c..a124d6e 100644
>>> |--- a/lib/odp-util.c
>>> |+++ b/lib/odp-util.c
>>> --
>>> No file to patch.  Skipping patch.
>>> patch:  malformed patch at line 192:  {
>>>
>>>
>>> I request you all if anybody could help me in patching properly. I have
>>> patch file that needs to be patched with OVS. Thanks!
>>>
>>>
>>> Best regards,
>>> 
>>> Taimur Hafeez
>>>
>>>
>>>
>>> ___
>>> discuss mailing list
>>> disc...@openvswi

Re: [ovs-discuss] Setting TCP rwnd value in Open vSwitch

2018-04-02 Thread Ali Volkan Atli
Hi Taimur

The patch is from a different branch than the original OVS. Also it is based on 
DPDK, I have never used it using kernel-based OvS. I just sent it to you as an 
example.

- Volkan 

From: ovs-discuss-boun...@openvswitch.org [ovs-discuss-boun...@openvswitch.org] 
on behalf of Taimur Hafeez [taimurhafee...@gmail.com]
Sent: Monday, April 2, 2018 9:54 AM
To: ovs-discuss@openvswitch.org
Subject: Re: [ovs-discuss] Setting TCP rwnd value in Open vSwitch

Dear Volkan,
Could you please tell version of OVS on which you applied "tcp_rwnd.diff" 
patch? Thanks in advance!

On Fri, Mar 23, 2018 at 5:11 PM, Taimur Hafeez 
mailto:taimurhafee...@gmail.com>> wrote:
I applied the patch but it I am unable to do it properly. For this reason, i am 
sharing environment on which i tried along with the terminal output. Also i 
tried various other commands of patching but unfortunately all in vain. Could 
you please what version of OVS and ubuntu you used for this patch? Please guide 
through this. Thankyou!

Environment 1:

OVS version 2.3.90
Linux sdnhubvm  4.4.0-97-generic #120-14.04.1-Ubuntu SMP

Environment 2:
OVS version 2.8.1
Linux ubuntu ibm  4.13.0-36-generic #40- Ubuntu SMP


**My comment==Environment 1 Ubuntu terminal log*
ubuntu@sdnhubvm:~/openvswitch$ patch -t <  tcp_rwnd.diff
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|diff --git a/datapath/linux/compat/include/linux/openvswitch.h 
b/datapath/linux/compat/include/linux/openvswitch.h
|index 12260d8..dd84b04 100644
|--- a/datapath/linux/compat/include/linux/openvswitch.h
|+++ b/datapath/linux/compat/include/linux/openvswitch.h
--
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 33
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|diff --git a/include/openvswitch/flow.h b/include/openvswitch/flow.h
|index df80dfe..64da205 100644
|--- a/include/openvswitch/flow.h
|+++ b/include/openvswitch/flow.h
--
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 57
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|diff --git a/include/openvswitch/ofp-actions.h 
b/include/openvswitch/ofp-actions.h
|index 74e9dcc..a7512e5 100644
|--- a/include/openvswitch/ofp-actions.h
|+++ b/include/openvswitch/ofp-actions.h
--
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 87
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|diff --git a/lib/odp-execute.c b/lib/odp-execute.c
|index 65a6fcd..b052f1c 100644
|--- a/lib/odp-execute.c
|+++ b/lib/odp-execute.c
--
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 122
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|diff --git a/lib/odp-util.c b/lib/odp-util.c
|index 626a82c..a124d6e 100644
|--- a/lib/odp-util.c
|+++ b/lib/odp-util.c
--
No file to patch.  Skipping patch.
patch:  malformed patch at line 192:  {


-


On Fri, Mar 23, 2018 at 5:07 PM, Taimur Hafeez 
mailto:taimurhafee...@gmail.com>> wrote:
I applied the patch but it I am unable to do it properly. For this reason, i am 
sharing environment on which i tried along with the terminal output. Also i 
tried various other commands of patching but unfortunately all in vain. Could 
you please what version of OVS and ubuntu you used for this patch? Please guide 
through this. Thankyou!

Environment 1:

OVS version 2.3.90
Linux sdnhubvm  4.4.0-97-generic #120-14.04.1-Ubuntu SMP

Environment 2:
OVS version 2.8.1
Linux ubuntu ibm  4.13.0-36-generic #40- Ubuntu SMP


**My comment==Environment 1 Ubuntu terminal log*
ubuntu@sdnhubvm:~/openvswitch$ patch -t <  tcp_rwnd.diff
can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|diff --git a/datapath/linux/compat/include/linux/openvswitch.h 
b/datapath/linux/compat/include/linux/openvswitch.h
|index 12260d8..dd84b04 100644
|--- a/datapath/linux/compat/include/linux/openvswitch.h
|+++ b/datapath/linux/compat/include/linux/openvswitch.h
--
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
can't find file to patch at input line 33
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|diff --git a/include/openvswitch/flow.h b/include/open

Re: [ovs-discuss] ovs-git list

2018-04-02 Thread Mark Michelson

On 03/31/2018 02:35 PM, Ben Pfaff wrote:

On Mon, Mar 26, 2018 at 05:06:52PM -0500, Mark Michelson wrote:

I'm subscribed to the ovs-git list but have not received any new messages on
that list since 24 March (commit f70b61d3 log: Add async commit support.).
The archives appear to stop there as well. Is there an issue with the list?


I don't see any problems with the setup at Github to direct emails to
the list, or in the Mailman configuration.  I do see that there have
been several emails on the list since then, including some from my
commits today, so I guess that if there was a problem then it was
intermittent.

(I don't subscribe to ovs-git myself.)



Yes, I appear to be receiving e-mails properly now as well. I guess 
there was some temporary hiccup that has been resolved.


Thanks for looking into it,
Mark!
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Error in "Make" after patching OVS

2018-04-02 Thread Mark Michelson
ovs_be16 is defined in a userspace header file and shouldn't be used in 
the Linux datapath code. You probably should be using __be16 instead.


On 04/02/2018 01:46 AM, Taimur Hafeez wrote:

Dear all,
I patched OVS successfully but when I issue "make" command it gives 
following error:



taimur@ubuntuibm:~/openvswitch-2.6.0$ make
make  all-recursive
make[1]: Entering directory `/home/taimur/openvswitch-2.6.0'
Making all in datapath
make[2]: Entering directory `/home/taimur/openvswitch-2.6.0/datapath'
Making all in linux
make[3]: Entering directory `/home/taimur/openvswitch-2.6.0/datapath/linux'
make -C /lib/modules/4.4.0-31-generic/build 
M=/home/taimur/openvswitch-2.6.0/datapath/linux modules

make[4]: Entering directory `/usr/src/linux-headers-4.4.0-31-generic'
   CC [M]  /home/taimur/openvswitch-2.6.0/datapath/linux/actions.o
In file included from 
/home/taimur/openvswitch-2.6.0/datapath/linux/actions.c:24:0:
/home/taimur/openvswitch-2.6.0/datapath/linux/compat/include/linux/openvswitch.h:443:2: 
error: unknown type name ‘ovs_be16’

   ovs_be16 rwnd;
   ^
make[5]: *** [/home/taimur/openvswitch-2.6.0/datapath/linux/actions.o] 
Error 1

make[4]: *** [_module_/home/taimur/openvswitch-2.6.0/datapath/linux] Error 2
make[4]: Leaving directory `/usr/src/linux-headers-4.4.0-31-generic'
make[3]: *** [default] Error 2
make[3]: Leaving directory `/home/taimur/openvswitch-2.6.0/datapath/linux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/taimur/openvswitch-2.6.0/datapath'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/taimur/openvswitch-2.6.0'
make: *** [all] Error 2

Could any body help on this? Thanks!


Best regards,

Taimur Hafeez



___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss



___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] [openvswitch 2.9.0] testsuite: 787 1011 1932 1933 1934 1935 1936 1937 1941 1943 failed

2018-04-02 Thread Ben Pfaff
On Sun, Apr 01, 2018 at 11:17:55PM +0100, Stuart Cardall wrote:
> The majority of the failures were due to Busybox's diff. With the patch
> & _without_ diffutils:

Thanks for testing.

I sent a patch that skips those tests if "normal" diff is unavailable:
https://patchwork.ozlabs.org/patch/894329/

I don't have time to investigate the final test failure right now, since
it seems that it would require some experimentation on Alpine Linux.
Maybe someone else has time to check it out.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Turn bridge into a HUB

2018-04-02 Thread Luiz Angelo Daros de Luca
Thanks!

Both did the trick. I only changed flood_vlans to flood_vlans=0-4095 to
include untagged vlans

Regards,


Em ter, 20 de mar de 2018 às 17:14, Ben Pfaff  escreveu:

> By default, VLAN tags will be preserved.
>
> If you don't need any MAC learning, then you could omit the
> priority=5 flow I listed, if you go that route.
>
> On Tue, Mar 20, 2018 at 04:30:38PM +, Luiz Angelo Daros de Luca wrote:
> > Thanks Ben,
> >
> > And how about vlan tags? Will it preserve them? Or should I set a "native
> > vlan" for both in and out ports?
> >
> > There is no "regular vlan" on this bridge. It is for flooding only.
> >
> > Em seg, 19 de mar de 2018 às 17:31, Ben Pfaff  escreveu:
> >
> > > On Mon, Mar 19, 2018 at 07:58:40PM +, Luiz Angelo Daros de Luca
> wrote:
> > > > Hello,
> > > >
> > > > I have a physical port receives traffic from mirrored ports in a
> physical
> > > > (core) switch. I would like to pass these packets to multiple VMs
> (xen),
> > > > replicating vlan tags when existing.
> > > >
> > > > With linux bridges, I set aging to 0 and, as it does not understand
> vlan
> > > > tags, everything works. Now I want to setup the same situation with
> ovs.
> > > > I'm still a newbie with ovs.
> > > >
> > > > Xen uses the /etc/xen/scripts/vif-openvswitch that allows me to
> specify
> > > tag
> > > > and trunk argument when a vm port is added (not much besides that).
> As I
> > > > might receive multiple vlans, I would like to not list all of them.
> > > >
> > > > I saw that flood_vlans might be useful. I simply need to flood all
> > > traffic
> > > > from the physical port on every other port but the physical one,
> > > > replicating vlan tags.
> > >
> > > You could set this up with flood_vlans, but you would have to list the
> > > vlans.  ovs-vsctl supports ranges, so you could probably do this
> easily,
> > > e.g.:
> > > ovs-vsctl set bridge br0 flood_vlans=1-4095
> > >
> > > Another way to do this would be to add flows or to use a controller to
> > > add flows.  All you really need is a high-priority flow that does
> normal
> > > processing for your "regular vlan" and another one that falls back to
> > > flooding, e.g.:
> > >
> > > priority=5, vlan_vid=1234, actions=normal
> > > priority=4, actions=flood
> > >
> > --
> >
> > Luiz Angelo Daros de Luca
> > luizl...@gmail.com
>
-- 

Luiz Angelo Daros de Luca
luizl...@gmail.com
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


Re: [ovs-discuss] Error in "Make" after patching OVS

2018-04-02 Thread Taimur Hafeez
thanks dear! I did changing and here is the result of new compilation:
taimur@ubuntuibm:~/Music/openvswitch-2.6.0$ make
sed -f ./build-aux/extract-odp-netlink-h <
datapath/linux/compat/include/linux/openvswitch.h > include/odp-netlink.h
make  all-recursive
make[1]: Entering directory `/home/taimur/Music/openvswitch-2.6.0'
Making all in datapath
make[2]: Entering directory `/home/taimur/Music/openvswitch-2.6.0/datapath'
Making all in linux
make[3]: Entering directory
`/home/taimur/Music/openvswitch-2.6.0/datapath/linux'
make -C /lib/modules/4.4.0-31-generic/build
M=/home/taimur/Music/openvswitch-2.6.0/datapath/linux modules
make[4]: Entering directory `/usr/src/linux-headers-4.4.0-31-generic'
  CC [M]  /home/taimur/Music/openvswitch-2.6.0/datapath/linux/actions.o
  CC [M]  /home/taimur/Music/openvswitch-2.6.0/datapath/linux/conntrack.o
  CC [M]  /home/taimur/Music/openvswitch-2.6.0/datapath/linux/datapath.o
  CC [M]  /home/taimur/Music/openvswitch-2.6.0/datapath/linux/dp_notify.o
  CC [M]  /home/taimur/Music/openvswitch-2.6.0/datapath/linux/flow.o
  CC [M]  /home/taimur/Music/openvswitch-2.6.0/datapath/linux/flow_netlink.o
In file included from
/home/taimur/Music/openvswitch-2.6.0/datapath/linux/compat/include/linux/compiler.h:4:0,
 from include/uapi/linux/stddef.h:1,
 from include/linux/stddef.h:4,
 from
/home/taimur/Music/openvswitch-2.6.0/datapath/linux/compat/include/linux/stddef.h:4,
 from ./include/uapi/linux/posix_types.h:4,
 from include/uapi/linux/types.h:13,
 from include/linux/types.h:5,
 from
/home/taimur/Music/openvswitch-2.6.0/datapath/linux/compat/include/linux/types.h:4,
 from include/uapi/linux/capability.h:16,
 from include/linux/capability.h:15,
 from include/linux/sched.h:15,
 from include/linux/uaccess.h:4,
 from
/home/taimur/Music/openvswitch-2.6.0/datapath/linux/flow_netlink.c:21:
/home/taimur/Music/openvswitch-2.6.0/datapath/linux/flow_netlink.c: In
function ‘ovs_key_attr_size’:
include/linux/compiler.h:467:20: error: call to ‘__compiletime_assert_287’
declared with attribute error: BUILD_BUG_ON failed:
OVS_KEY_ATTR_TUNNEL_INFO != 26
prefix ## suffix();\
^
include/linux/compiler.h:472:2: note: in expansion of macro
‘__compiletime_assert’
  __compiletime_assert(condition, msg, prefix, suffix)
  ^
include/linux/compiler.h:484:2: note: in expansion of macro
‘_compiletime_assert’
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
  ^
include/linux/bug.h:50:37: note: in expansion of macro ‘compiletime_assert’
 #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
 ^
include/linux/bug.h:74:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
  BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
  ^
/home/taimur/Music/openvswitch-2.6.0/datapath/linux/flow_netlink.c:287:2:
note: in expansion of macro ‘BUILD_BUG_ON’
  BUILD_BUG_ON(OVS_KEY_ATTR_TUNNEL_INFO != 26);
  ^
make[5]: ***
[/home/taimur/Music/openvswitch-2.6.0/datapath/linux/flow_netlink.o] Error 1
make[4]: *** [_module_/home/taimur/Music/openvswitch-2.6.0/datapath/linux]
Error 2
make[4]: Leaving directory `/usr/src/linux-headers-4.4.0-31-generic'
make[3]: *** [default] Error 2
make[3]: Leaving directory
`/home/taimur/Music/openvswitch-2.6.0/datapath/linux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/taimur/Music/openvswitch-2.6.0/datapath'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/taimur/Music/openvswitch-2.6.0'
make: *** [all] Error 2


On Mon, Apr 2, 2018 at 7:21 PM, Mark Michelson  wrote:

> ovs_be16 is defined in a userspace header file and shouldn't be used in
> the Linux datapath code. You probably should be using __be16 instead.
>
>
> On 04/02/2018 01:46 AM, Taimur Hafeez wrote:
>
>> Dear all,
>> I patched OVS successfully but when I issue "make" command it gives
>> following error:
>>
>>
>> taimur@ubuntuibm:~/openvswitch-2.6.0$ make
>> make  all-recursive
>> make[1]: Entering directory `/home/taimur/openvswitch-2.6.0'
>> Making all in datapath
>> make[2]: Entering directory `/home/taimur/openvswitch-2.6.0/datapath'
>> Making all in linux
>> make[3]: Entering directory `/home/taimur/openvswitch-2.6.
>> 0/datapath/linux'
>> make -C /lib/modules/4.4.0-31-generic/build
>> M=/home/taimur/openvswitch-2.6.0/datapath/linux modules
>> make[4]: Entering directory `/usr/src/linux-headers-4.4.0-31-generic'
>>CC [M]  /home/taimur/openvswitch-2.6.0/datapath/linux/actions.o
>> In file included from /home/taimur/openvswitch-2.6.0
>> /datapath/linux/actions.c:24:0:
>> /home/taimur/openvswitch-2.6.0/datapath/linux/compat/include/linux/openvswitch.h:443:2:
>> error: unknown type name ‘ovs_be16’
>>ovs_be16 rwnd;
>>^
>> make[5]: *** [/home/taimur/openvswitch-2.6.0/datapath/linux/actions