Browse Source

Add Support for Smart NIC in OVS ML2 mech driver

This spec is the Neutron side changes to support
smart NICs with Neutron OVS ML2 mechanism driver
and Neutron OVS Agent.

Related-Bug: #1785608

Change-Id: I658754f7f8c74087b0aabfdef222a2c0b5698541
Moshe Levi 4 months ago
parent
commit
33d4d845f1
1 changed files with 153 additions and 0 deletions
  1. 153
    0
      specs/stein/neutron-ovs-agent-support-baremetal-with-smart-nic.rst

+ 153
- 0
specs/stein/neutron-ovs-agent-support-baremetal-with-smart-nic.rst View File

@@ -0,0 +1,153 @@
1
+..
2
+ This work is licensed under a Creative Commons Attribution 3.0 Unported
3
+ License.
4
+
5
+ http://creativecommons.org/licenses/by/3.0/legalcode
6
+
7
+======================================================
8
+Neutron OVS Agent Support for Baremetal with Smart NIC
9
+======================================================
10
+
11
+https://bugs.launchpad.net/neutron/+bug/1785608
12
+
13
+This spec describes proposed changes to the Neutron OVS mechanism driver and
14
+the Neutron OVS agent to enable a generic, vendor-agnostic, baremetal
15
+networking service running on smart NICs, enabling baremetal networking
16
+with feature parity to the virtualization use-case.
17
+
18
+
19
+Problem Description
20
+===================
21
+
22
+While Ironic today supports Neutron provisioned network connectivity for
23
+baremetal servers through an ML2 mechanism driver, the existing support
24
+is based largely on configuration of TORs through vendor-specific mechanism
25
+drivers, with limited capabilities.
26
+
27
+
28
+Proposed Change
29
+===============
30
+
31
+There is a wide range of smart/intelligent NICs emerging on the market.
32
+These NICs generally incorporate one or more general purpose CPU cores along
33
+with data-plane packet processing acceleration, and can efficiently run
34
+virtual switches such as OVS, while maintaining the existing interfaces to the
35
+SDN layer.
36
+
37
+The proposal is to extend the Neutron OVS mechanism driver and Neutron OVS Agent
38
+to bind the Neutron port for the baremetal host with smart NIC. This will allow
39
+the Neutron OVS Agent to configure the pipeline of the OVS running on the
40
+smart NIC and leverage the pipeline features such as: VXLAN, Security Groups and
41
+ARP Responder.
42
+
43
+This spec is complementary to the Ironic spec [1]_.
44
+
45
+In this proposal, we address two use-cases:
46
+
47
+#. Neutron OVS L2 agent runs locally on the smart NIC.
48
+#. Neutron OVS L2 agent(s) run remotely and manages the OVS bridges for all
49
+   the baremetal smart NICs.
50
+
51
+Example of smart NIC model::
52
+
53
+  +---------------------+
54
+  |      baremetal      |
55
+  | +-----------------+ |
56
+  | |  OS Server    | | |
57
+  | |               | | |
58
+  | |      +A       | | |
59
+  | +------|--------+ | |
60
+  |        |          | |
61
+  | +------|--------+ | |
62
+  | |  OS SmartNIC  | | |
63
+  | |    +-+B-+     | | |
64
+  | |    |OVS |     | | |
65
+  | |    +-+C-+     | | |
66
+  | +------|--------+ | |
67
+  +--------|------------+
68
+           |
69
+
70
+  A - port on the baremetal host.
71
+  B - port that represents the baremetal port in the smart NIC.
72
+  C - port that represents to the physical port in the smart NIC.
73
+
74
+- Ironic creation of Neutron Port:
75
+
76
+  #. Create Neutron port with new vnic_type called `smart-nic`.
77
+  #. Add local_link_information with the following attributes:
78
+
79
+    #. smart NIC hostname - the hostname of server/smart NIC where the Neutron
80
+       OVS agent is running. (required)
81
+    #. smart NIC port id - the port name that needs to be plugged to the
82
+       integration bridge. B in the diagram above(required)
83
+    #. smart NIC SSH public key - ssh public key of the smart NIC
84
+       (required only for remote)
85
+    #. smart NIC OVSDB SSL certificate - OVSDB SSL of the OVS in smart NIC
86
+       (required only remote)
87
+
88
+- Neutron OVS ML2 Mechanism Driver:
89
+
90
+  The OVS ML2 will allow binding the `smart-nic` vnic_type. The rationale
91
+  for creating new vnic_type and not using the barmetal one is that there is a
92
+  wide range of mechanism drivers that use hierarchical port binding for
93
+  configuring TOR switches and we want to allow this to work with smart NICs.
94
+  for example mechanism_drivers=cisco_nexus,openvswitch
95
+
96
+  The OVS ML2 mechanism driver will determine if the Neutron OVS Agent runs
97
+  locally or remotely based on smart NIC configuration passed from ironic as
98
+  described above.
99
+
100
+  In case the Neutron OVS L2 agent runs locally on the smart NIC the OVS
101
+  mechanism driver will locate the Neutron OVS agent by the smart
102
+  NIC hostname attribute. For the remote case the changes are captured
103
+  in this neutron spec [2]_.
104
+
105
+- Neutron OVS Agent:
106
+
107
+  Extend the port_update rpc method as following:
108
+
109
+  .. code-block:: python
110
+
111
+      def port_update(self, context, **kwargs):
112
+        port = kwargs.get('port')
113
+        # get the port data from cache
114
+        port_data = self.plugin_rpc.remote_resource_cache. \
115
+                get_resource_by_id(resources.PORT, port['id'])
116
+        # if smart-nic port add it to updated_smart_nic_ports with
117
+        # the required information for adding the port to OVSDB
118
+        port_binding = port_data['bindings']
119
+        if port_binding['vnic_type'] == 'smart-nic':
120
+                ifname = smart_nic_port_data['port_binding']['profile'] \
121
+                    ['local_link_information'][0]['port_id']
122
+                mac = port_data['mac_address']
123
+                node_uuid = port_data['device_id']
124
+                port_binding['vif_type'] = vif_type
125
+                self.updated_smart_nic_ports.append({
126
+                                'mac': mac,
127
+                                'node_uuid': node_uuid,
128
+                                'iface_id': port['id'],
129
+                                'iface_name': ifname,
130
+                                'vif_type': vif_type})
131
+        self.updated_ports.add(port['id'])
132
+
133
+  When Neutron processes the ports the Neuton OVS agent will add the
134
+  smart NIC port(s) to the OVSDB by ovs plugin in os-vif.
135
+
136
+  Because RPC is not reliable we need to extend the full sync to do the following:
137
+
138
+  #. when sync is True we will retrieve all the smart-nic ports for this agent.
139
+     This requires to add another RPC call.
140
+  #. We will compare the retrieved smart-nic ports for the Neutron server to the
141
+     existing smart-nic port on the integration bridge.
142
+  #. if the smart-nic port is only on the Neutron server we will add it to
143
+     the added list in the port_info.
144
+  #. if the smart-nic port is only on the integration bridge we will add it
145
+     to the removed list in the port_info.
146
+
147
+
148
+References
149
+==========
150
+
151
+.. [1] https://review.openstack.org/#/c/582767/
152
+
153
+.. [2] https://review.openstack.org/#/c/595402/

Loading…
Cancel
Save