[ovs-dev] [PATCH 7/7] datapath-windows: OvsFindVportByPortIdAndNicIndex() and external port
Ankur Sharma
ankursharma at vmware.com
Fri Oct 24 22:27:39 UTC 2014
Acked-by: Ankur Sharma <ankursharma at vmware.com>
________________________________________
From: dev <dev-bounces at openvswitch.org> on behalf of Alin Serdean <aserdean at cloudbasesolutions.com>
Sent: Friday, October 24, 2014 3:15 PM
To: Nithin Raju; dev at openvswitch.org
Subject: Re: [ovs-dev] [PATCH 7/7] datapath-windows: OvsFindVportByPortIdAndNicIndex() and external port
Acked-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
Tested-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
-----Mesaj original-----
De la: dev [mailto:dev-bounces at openvswitch.org] În numele Nithin Raju
Trimis: Friday, October 24, 2014 3:33 AM
Către: dev at openvswitch.org
Subiect: [ovs-dev] [PATCH 7/7] datapath-windows: OvsFindVportByPortIdAndNicIndex() and external port
We use OvsFindVportByPortIdAndNicIndex() to lookup the vport for a packte received from the Hyper-V switch. If a packet was indeed received from the virtual external NIC, we should flag it.
Validation:
1. Install and Uninstall the OVS EXT Driver (without enabling the OVS
extension on the Hyper-V switch).
2. Install and Uninstall the OVS EXT Driver (with enabling the OVS
extension on the Hyper-V switch). Hyper-V switch had a few ports.
3. Install and Uninstall the OVS EXT Driver (with enabling the OVS
extension on the Hyper-V switch). Added a few ports before
uninstalling.
4. Install the OVS EXT driver, and test the following functionality:
a) ping between 2 VMs on the same host
b) ping between 2 VMs on 2 Hyper-Vs - one physical and another
virtual backed by VLAN (patch port between br-pif and br-int).
c) ping between 2 VMs on 2 Hyper-Vs - one physical and another
virtual backed by VXLAN.
d) Successful uninstallation after these tests.
Signed-off-by: Nithin Raju <nithin at vmware.com>
---
datapath-windows/ovsext/Vport.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c index 1e8154e..d951d08 100644
--- a/datapath-windows/ovsext/Vport.c
+++ b/datapath-windows/ovsext/Vport.c
@@ -552,9 +552,13 @@ OvsFindVportByPortIdAndNicIndex(POVS_SWITCH_CONTEXT switchContext,
NDIS_SWITCH_PORT_ID portId,
NDIS_SWITCH_NIC_INDEX index) {
- if (portId == switchContext->virtualExternalPortId) {
+ if (switchContext->virtualExternalVport &&
+ portId == switchContext->virtualExternalPortId &&
+ index == switchContext->virtualExternalVport->nicIndex) {
return (POVS_VPORT_ENTRY)switchContext->virtualExternalVport;
- } else if (switchContext->internalPortId == portId) {
+ } else if (switchContext->internalVport &&
+ portId == switchContext->internalPortId &&
+ index == switchContext->internalVport->nicIndex) {
return (POVS_VPORT_ENTRY)switchContext->internalVport;
} else {
PLIST_ENTRY head, link;
--
1.7.4.1
_______________________________________________
dev mailing list
dev at openvswitch.org
https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/mailman/listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=f6EhnZ0ORGZNt5QbYmRaOxfWfx%2Bqd3KEiPf3%2FYaollU%3D%0A&m=U7KbDG6cKGlUCcuuTItYjVDSNAiWOrx7yb9%2B%2Fm5i0m0%3D%0A&s=3818b17baaf60aee19817df3c8d491c8a633ae8c8b31f1fe9882843cdb688cf8
_______________________________________________
dev mailing list
dev at openvswitch.org
https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/mailman/listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=f6EhnZ0ORGZNt5QbYmRaOxfWfx%2Bqd3KEiPf3%2FYaollU%3D%0A&m=U7KbDG6cKGlUCcuuTItYjVDSNAiWOrx7yb9%2B%2Fm5i0m0%3D%0A&s=3818b17baaf60aee19817df3c8d491c8a633ae8c8b31f1fe9882843cdb688cf8
More information about the dev
mailing list