> > On 1/31/20, 10:42, "Amber Hu" <q...@vmware.com> wrote: > > > Formerly, there is no tunnel information appended in the upcall’s > packet data, which is expected by IPFIX in userspace to calculate > the template for exporting the sampled flow record of on egress > tunnel port. > To fix this, during performing OvsOutputUserspaceAction(), we > would check whether it is initiated by the sampling on egress > tunnel which would be indicated by the attribute as > OVS_USERSPACE_ATTR_EGRESS_TUN_PORT in the nested attribute > list. If so, we would append the tunKey in OvsForwardingContext > indexed by OVS_PACKET_ATTR_EGRESS_TUN_KEY to the upcall. > Besides, at this point, the source transport port and source ip > address are not available in the structure, so we have to fill it in > the > way how the packet would be capsulated during performing > OvsEncapGeneve(), which is following the > OvsOutputUserspaceAction() unfortunately. > I have tested the IPFIX functionality with the change, we could see > the > template is correct and the expected tunnel information could be > packed in the IPFIX packet finally. The traffic for test is generated > by > PING utility. > > Signed-off-by: Amber Hu <q...@vmware.com> > > From 31e3baa833d4d37686c3402b95db018ad132d3b7 Mon Sep 17 > 00:00:00 2001 > From: Amber Hu <q...@vmware.com> > Date: Thu, 30 Jan 2020 18:01:32 -0800 > Subject: [PATCH] datapath-windows: Append tunnel info to upcall for > correct > template > > Signed-off-by: Amber Hu <q...@vmware.com> [Alin Serdean] The patch will break compilation. You probably want the following incremental: $ git diff datapath-windows/ovsext/Tunnel.c diff --git a/datapath-windows/ovsext/Tunnel.c b/datapath-windows/ovsext/Tunnel.c index ad2c254f5..5d1be80f4 100644 --- a/datapath-windows/ovsext/Tunnel.c +++ b/datapath-windows/ovsext/Tunnel.c @@ -308,7 +308,7 @@ OvsInjectPacketThroughActions(PNET_BUFFER_LIST pNbl,
datapath->misses++; elem = OvsCreateQueueNlPacket(NULL, 0, OVS_PACKET_CMD_MISS, - vport, &key, pNbl, curNb, + vport, &key, NULL, pNbl, curNb, TRUE, &layers); if (elem) { /* Complete the packet since it was copied to user buffer. */ Also mark the patch as a new version, it is easier for me to see it. Alin. _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev