[ovs-git] [openvswitch/ovs] 0442bf: ofproto-dpif-upcall: Echo HASH attribute back to d...

NIC我是一张网卡 noreply at github.com
Fri Nov 22 17:52:14 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 0442bfb11d6ccbf11754ef1d6de603b970465302
      https://github.com/openvswitch/ovs/commit/0442bfb11d6ccbf11754ef1d6de603b970465302
  Author: Tonghao Zhang <xiangxia.m.yue at gmail.com>
  Date:   2019-11-22 (Fri, 22 Nov 2019)

  Changed paths:
    M datapath/linux/compat/include/linux/openvswitch.h
    M lib/dpif-netlink.c
    M lib/dpif.h
    M ofproto/ofproto-dpif-upcall.c

  Log Message:
  -----------
  ofproto-dpif-upcall: Echo HASH attribute back to datapath.

The kernel datapath may sent upcall with hash info,
ovs-vswitchd should get it from upcall and then send
it back.

The reason is that:
| When using the kernel datapath, the upcall don't
| include skb hash info relatived. That will introduce
| some problem, because the hash of skb is important
| in kernel stack. For example, VXLAN module uses
| it to select UDP src port. The tx queue selection
| may also use the hash in stack.
|
| Hash is computed in different ways. Hash is random
| for a TCP socket, and hash may be computed in hardware,
| or software stack. Recalculation hash is not easy.
|
| There will be one upcall, without information of skb
| hash, to ovs-vswitchd, for the first packet of a TCP
| session. The rest packets will be processed in Open vSwitch
| modules, hash kept. If this tcp session is forward to
| VXLAN module, then the UDP src port of first tcp packet
| is different from rest packets.
|
| TCP packets may come from the host or dockers, to Open vSwitch.
| To fix it, we store the hash info to upcall, and restore hash
| when packets sent back.

Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2019-October/364062.html
Link: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=bd1903b7c4596ba6f7677d0dfefd05ba5876707d
Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>




More information about the git mailing list