On 1/2/2019 6:04 PM, Ben Pfaff wrote:
> On Wed, Jan 02, 2019 at 02:58:48PM +0000, Eli Britstein wrote:
>> Hello,
>>
>> Simple bridge, with 2 ports:
>>
>> ovs-vsctl show
>> 66abf37d-391e-45ba-b740-d2d0f414cd15
>>      Bridge "br1"
>>          Port "enp4s0f0_1"
>>              Interface "enp4s0f0_1"
>>          Port "enp4s0f0_0"
>>              Interface "enp4s0f0_0"
>>          Port "br1"
>>              Interface "br1"
>>                  type: internal
>>      ovs_version: "2.10.90"
>>
>> master version, last commit:
>> 46df7fac7 netdev-tc-offloads: Support IPv6 hlimit rewrite
>>
>>
>>
>> Single OF rule, to change MAC and DSTIP.
>> ovs-ofctl del-flows br1
>> ovs-ofctl add-flow br1 
>> in_port=1,dl_dst=e4:11:22:33:44:51,dl_type=0x0800,nw_src=4.4.4.10,nw_dst=4.4.4.11,actions=mod_dl_dst=e4:11:22:33:aa:bb,mod_nw_dst=4.6.4.51,output:2
>>
>> ovs-ofctl dump-flows br1
>>   cookie=0x0, duration=0.012s, table=0, n_packets=0, n_bytes=0, 
>> ip,in_port="enp4s0f0_0",dl_dst=e4:11:22:33:44:51,nw_src=4.4.4.10,nw_dst=4.4.4.11
>>  actions=mod_dl_dst:e4:11:22:33:aa:bb,mod_nw_dst:4.6.4.51,output:"enp4s0f0_1"
>>
>>
>> In ovs-dpctl it can be seen that the SRCIP is also applied with a rewrite to 
>> the same value, though not requested.
>> ovs-dpctl dump-flows --names
>> in_port(enp4s0f0_0),eth(dst=e4:11:22:33:44:51),eth_type(0x0800),ipv4(src=4.4.4.10,dst=4.4.4.11,proto=1,frag=no),
>>  packets:1, bytes:98, used:2.240s, 
>> actions:set(eth(dst=e4:11:22:33:aa:bb)),set(ipv4(src=4.4.4.10,dst=4.6.4.51)),enp4s0f0_1
>>
>>
>> I think it is a bug.
> I don't see a bug.  What's the problem?

There was no request to rewrite the src ip field (no mod_nw_src), but 
dpctl shows a rewrite operation set(ipv4(src=4.4.4.10)... though it does 
not malfunction, it is not required and can degrade performance. 
Furthermore, if we want to offloaded it to HW, this operation consumes 
HW resources that might end up with not offloading it.

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to