Re: [ovs-discuss] Why OVS behaves difference between ovs-vswitchd and ovs-vswitchd-dpdk?

2021-06-07 Thread Harry Lee


> 2021年6月4日 下午11:21,Ben Pfaff  写道:
> 
> On Fri, Jun 04, 2021 at 02:11:23PM +0800, Harry Lee wrote:
>> Hello,
>> 
>> My server is running debian testing. I install two ovs version through apt:
>> 
>> ```
>> openvswitch-switch/testing,unstable,now 2.15.0+ds1-2 amd64 [installed]
>>  Open vSwitch switch implementations
>> 
>> openvswitch-switch-dpdk/testing,unstable,now 2.15.0+ds1-2 amd64 [installed]
>>  DPDK enabled Open vSwitch switch implementation
>> ```
>> 
>> Then I found something  difference between them.
>> 
>> Here's my experience:
>> 
>> ```
>> # switch ovs version to ovs-vswitchd
>> update-alternatives --set ovs-vswitchd 
>> /usr/lib/openvswitch-common/ovs-vswitchd
>> /etc/init.d/openvswitch-switch restart
>> ip addr add 10.90.67.148/25 dev br0
>> ping 10.90.67.129  # network is ok
>> 
>> # switch ovs version to ovs-vswitchd-dpdk
>> update-alternatives --set ovs-vswitchd 
>> /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk
>> /etc/init.d/openvswitch-switch restart
>> ip addr add 10.90.67.148/25 dev br0
>> ping 10.90.67.129  # unreachable
>> ```
>> 
>> The same configuration, using ovs-vswitchd was reachable while using 
>> ovs-vswitchd-dpdk was unreachable.
>> 
>> Then I used `tcpdump br0` to checkout if there are packets from br0, and I 
>> found some ARP packets:
>> 
>> ```
>> root@debian:~# tcpdump -i br0 -nnn
>> tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
>> listening on br0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
>> 02:14:27.010265 ARP, Request who-has 10.90.67.129 tell 10.90.67.148, length 
>> 28
>> 02:14:28.034127 ARP, Request who-has 10.90.67.129 tell 10.90.67.148, length 
>> 28
>> 02:14:29.058128 ARP, Request who-has 10.90.67.129 tell 10.90.67.148, length 
>> 28
>> ```
>> 
>> But when I ran `ovs-ofctl dump-flows br0`, I saw n_packets is 0:
>> 
>> ```
>> root@debian:~# ovs-ofctl dump-flows br0
>> cookie=0x0, duration=1016.243s, table=0, n_packets=0, n_bytes=0, priority=0 
>> actions=NORMAL
>> ```
>> 
>> Why does ovs-vswitchd-dpdk ignore the packet from br0? Does it need 
>> additional configuration?
> 
> Did you configure the dpdk version to use DPDK devices and the userspace
> datapath?  If you didn't, then these two versions of OVS were using the
> same code in the same way, so it's puzzling why there would have been
> any difference.

Did you mean `ovs-vsctl --no-wait set Open_vSwitch . 
other_config:dpdk-init=false` ?

I had set it to false and restart, but no matter I set it true or set it false, 
the results were the same.

By the way, I found some warning in log:

```
2021-06-07T10:36:26.790Z|1|vlog|INFO|opened log file 
/var/log/openvswitch/ovs-vswitchd.log
2021-06-07T10:36:26.794Z|2|ovs_numa|INFO|Discovered 20 CPU cores on NUMA 
node 0
2021-06-07T10:36:26.795Z|3|ovs_numa|INFO|Discovered 20 CPU cores on NUMA 
node 1
2021-06-07T10:36:26.795Z|4|ovs_numa|INFO|Discovered 2 NUMA nodes and 40 CPU 
cores
2021-06-07T10:36:26.795Z|5|reconnect|INFO|unix:/var/run/openvswitch/db.sock:
 connecting...
2021-06-07T10:36:26.795Z|6|reconnect|INFO|unix:/var/run/openvswitch/db.sock:
 connected
2021-06-07T10:36:26.799Z|7|bridge|INFO|ovs-vswitchd (Open vSwitch) 2.15.0
2021-06-07T10:36:26.801Z|8|dpdk|INFO|DPDK Disabled - Use 
other_config:dpdk-init to enable
2021-06-07T10:36:26.830Z|9|ofproto_dpif|INFO|system@ovs-system: Datapath 
supports recirculation
2021-06-07T10:36:26.830Z|00010|ofproto_dpif|INFO|system@ovs-system: VLAN header 
stack length probed as 2
2021-06-07T10:36:26.830Z|00011|ofproto_dpif|INFO|system@ovs-system: MPLS label 
stack length probed as 3
2021-06-07T10:36:26.830Z|00012|ofproto_dpif|INFO|system@ovs-system: Datapath 
supports truncate action
2021-06-07T10:36:26.830Z|00013|ofproto_dpif|INFO|system@ovs-system: Datapath 
supports unique flow ids
2021-06-07T10:36:26.830Z|00014|ofproto_dpif|INFO|system@ovs-system: Datapath 
supports clone action
2021-06-07T10:36:26.831Z|00015|ofproto_dpif|INFO|system@ovs-system: Max sample 
nesting level probed as 10
2021-06-07T10:36:26.831Z|00016|ofproto_dpif|INFO|system@ovs-system: Datapath 
supports eventmask in conntrack action
2021-06-07T10:36:26.831Z|00017|ofproto_dpif|INFO|system@ovs-system: Datapath 
supports ct_clear action
2021-06-07T10:36:26.831Z|00018|ofproto_dpif|INFO|system@ovs-system: Max dp_hash 
algorithm probed to be 0
2021-06-07T10:36:26.831Z|00019|ofproto_dpif|INFO|system@ovs-system: Datapath 
supports check_pkt_len action
2021-06-07T10:36:26.831Z|00020|ofproto_dpif|INFO|system@ovs-system: Datapath 
supports timeout policy in conntrack action
2021-06-07T10:36:26.831Z|00021|ofproto_dpif|INFO|system@ovs-system: Datapath 
supports ct_state
2021-06-07T10:36:26.831Z|00022|ofproto_dpif|INFO|system@ovs-system: Datapath 
supports ct_zone
2021-06-07T10:36:26.831Z|00023|ofproto_dpif|INFO|system@ovs-system: Datapath 
supports ct_mark
2021-06-07T10:36:26.831Z|00024|ofproto_dpif|INFO|system@ovs-system: Datapath 
supports ct_label

Re: [ovs-discuss] Why OVS behaves difference between ovs-vswitchd and ovs-vswitchd-dpdk?

2021-06-04 Thread Ben Pfaff
On Fri, Jun 04, 2021 at 02:11:23PM +0800, Harry Lee wrote:
> Hello,
> 
> My server is running debian testing. I install two ovs version through apt:
> 
> ```
> openvswitch-switch/testing,unstable,now 2.15.0+ds1-2 amd64 [installed]
>   Open vSwitch switch implementations
> 
> openvswitch-switch-dpdk/testing,unstable,now 2.15.0+ds1-2 amd64 [installed]
>   DPDK enabled Open vSwitch switch implementation
> ```
> 
> Then I found something  difference between them.
> 
> Here's my experience:
> 
> ```
> # switch ovs version to ovs-vswitchd
> update-alternatives --set ovs-vswitchd 
> /usr/lib/openvswitch-common/ovs-vswitchd
> /etc/init.d/openvswitch-switch restart
> ip addr add 10.90.67.148/25 dev br0
> ping 10.90.67.129  # network is ok
> 
> # switch ovs version to ovs-vswitchd-dpdk
> update-alternatives --set ovs-vswitchd 
> /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk
> /etc/init.d/openvswitch-switch restart
> ip addr add 10.90.67.148/25 dev br0
> ping 10.90.67.129  # unreachable
> ```
> 
> The same configuration, using ovs-vswitchd was reachable while using 
> ovs-vswitchd-dpdk was unreachable.
> 
> Then I used `tcpdump br0` to checkout if there are packets from br0, and I 
> found some ARP packets:
> 
> ```
> root@debian:~# tcpdump -i br0 -nnn
> tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
> listening on br0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
> 02:14:27.010265 ARP, Request who-has 10.90.67.129 tell 10.90.67.148, length 28
> 02:14:28.034127 ARP, Request who-has 10.90.67.129 tell 10.90.67.148, length 28
> 02:14:29.058128 ARP, Request who-has 10.90.67.129 tell 10.90.67.148, length 28
> ```
> 
> But when I ran `ovs-ofctl dump-flows br0`, I saw n_packets is 0:
> 
> ```
> root@debian:~# ovs-ofctl dump-flows br0
>  cookie=0x0, duration=1016.243s, table=0, n_packets=0, n_bytes=0, priority=0 
> actions=NORMAL
> ```
> 
> Why does ovs-vswitchd-dpdk ignore the packet from br0? Does it need 
> additional configuration?

Did you configure the dpdk version to use DPDK devices and the userspace
datapath?  If you didn't, then these two versions of OVS were using the
same code in the same way, so it's puzzling why there would have been
any difference.
___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss


[ovs-discuss] Why OVS behaves difference between ovs-vswitchd and ovs-vswitchd-dpdk?

2021-06-04 Thread Harry Lee
Hello,

My server is running debian testing. I install two ovs version through apt:

```
openvswitch-switch/testing,unstable,now 2.15.0+ds1-2 amd64 [installed]
  Open vSwitch switch implementations

openvswitch-switch-dpdk/testing,unstable,now 2.15.0+ds1-2 amd64 [installed]
  DPDK enabled Open vSwitch switch implementation
```

Then I found something  difference between them.

Here's my experience:

```
# switch ovs version to ovs-vswitchd
update-alternatives --set ovs-vswitchd /usr/lib/openvswitch-common/ovs-vswitchd
/etc/init.d/openvswitch-switch restart
ip addr add 10.90.67.148/25 dev br0
ping 10.90.67.129  # network is ok

# switch ovs version to ovs-vswitchd-dpdk
update-alternatives --set ovs-vswitchd 
/usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk
/etc/init.d/openvswitch-switch restart
ip addr add 10.90.67.148/25 dev br0
ping 10.90.67.129  # unreachable
```

The same configuration, using ovs-vswitchd was reachable while using 
ovs-vswitchd-dpdk was unreachable.

Then I used `tcpdump br0` to checkout if there are packets from br0, and I 
found some ARP packets:

```
root@debian:~# tcpdump -i br0 -nnn
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on br0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
02:14:27.010265 ARP, Request who-has 10.90.67.129 tell 10.90.67.148, length 28
02:14:28.034127 ARP, Request who-has 10.90.67.129 tell 10.90.67.148, length 28
02:14:29.058128 ARP, Request who-has 10.90.67.129 tell 10.90.67.148, length 28
```

But when I ran `ovs-ofctl dump-flows br0`, I saw n_packets is 0:

```
root@debian:~# ovs-ofctl dump-flows br0
 cookie=0x0, duration=1016.243s, table=0, n_packets=0, n_bytes=0, priority=0 
actions=NORMAL
```

Why does ovs-vswitchd-dpdk ignore the packet from br0? Does it need additional 
configuration?___
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss