[ovs-dev] [PATCH] datapath-windows: use ip proto for tunnel port lookup

Alin Serdean aserdean at cloudbasesolutions.com
Fri Jun 17 17:25:46 UTC 2016


> 
> [Nithin]: The code is simpler this way. No? I can add a comment to clarify and
> an ASSERT as well. BTW, we already make assumptions in the code w.r.t the
> L4 port number for GRE ports. Pls. have a look at the following code:
[Alin Gabriel Serdean: ] The problem is not we make an assumption on the port being zero. The problem is related to the IP protocol match. I think my comment was unclear see the comment sent out on v3 of this patch.
> 
> NDIS_STATUS
> InitOvsVportCommon(POVS_SWITCH_CONTEXT switchContext,
>                    POVS_VPORT_ENTRY vport)
> {
> 	UINT32 hash;
> 
> 	switch(vport->ovsType) {
> 	case OVS_VPORT_TYPE_GRE:
> 	case OVS_VPORT_TYPE_VXLAN:
> 	case OVS_VPORT_TYPE_STT:
> 	{
> 	UINT16 dstPort = GetPortFromPriv(vport); <<<<< L4 port # is 0 for
> GRE port.
> 	hash = OvsJhashBytes(&dstPort,
> 			sizeof(dstPort),
> 			OVS_HASH_BASIS);
> 	InsertHeadList(
> 		&gOvsSwitchContext->tunnelVportsArray[hash &
> OVS_VPORT_MASK],
> 		&vport->tunnelVportLink);
> 		switchContext->numNonHvVports++;
> 	break;
> 	}
> 
> 
> I¹ll send out a v3. Pls. have a look.
> 
> Thanks,
> -- Nithin




More information about the dev mailing list