Merge "port-hint-ovs-tx-steering: shim extension"
This commit is contained in:
commit
fc5634371e
21
neutron/extensions/port_hint_ovs_tx_steering.py
Normal file
21
neutron/extensions/port_hint_ovs_tx_steering.py
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright 2023 Ericsson Software Technology
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from neutron_lib.api.definitions import port_hint_ovs_tx_steering \
|
||||
as phint_txs_def
|
||||
from neutron_lib.api import extensions as api_extensions
|
||||
|
||||
|
||||
class Port_hint_ovs_tx_steering(api_extensions.APIExtensionDescriptor):
|
||||
api_definition = phint_txs_def
|
35
neutron/plugins/ml2/extensions/port_hint_ovs_tx_steering.py
Normal file
35
neutron/plugins/ml2/extensions/port_hint_ovs_tx_steering.py
Normal file
@ -0,0 +1,35 @@
|
||||
# Copyright 2023 Ericsson Software Technology
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from neutron_lib.plugins.ml2 import api
|
||||
from oslo_log import log as logging
|
||||
|
||||
from neutron_lib.api.definitions import port_hint_ovs_tx_steering \
|
||||
as phint_txs_def
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class PortHintOvsTxSteeringExtensionDriver(api.ExtensionDriver):
|
||||
|
||||
_supported_extension_alias = phint_txs_def.ALIAS
|
||||
|
||||
def initialize(self):
|
||||
LOG.info(
|
||||
'PortHintOvsTxSteeringExtensionDriver initialization complete')
|
||||
|
||||
@property
|
||||
def extension_alias(self):
|
||||
return self._supported_extension_alias
|
@ -0,0 +1,13 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The first hint using the new ``hints`` port attribute is the
|
||||
``ovs-tx-steering`` hint. The availability of this is marked
|
||||
by the extension: ``port-hint-ovs-tx-steering``. This hint is
|
||||
specific to the ``openvswitch`` mechanism driver. It enables
|
||||
the control of Open vSwitch's Userspace Tx packet steering
|
||||
feature. For details about the Open vSwitch feature please see:
|
||||
https://docs.openvswitch.org/en/latest/topics/userspace-tx-steering/
|
||||
The valid values for the ``hints`` attribute introduced by the 2nd
|
||||
extension are:
|
||||
``{"openvswitch": {"other_config": {"tx-steering": "hash|thread"}}}``
|
12
releasenotes/notes/port-hints-d465bb2fa144537c.yaml
Normal file
12
releasenotes/notes/port-hints-d465bb2fa144537c.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Ports now have a ``hints`` attribute, in which backend specific
|
||||
tuning options can be passed to Neutron. The availability of the
|
||||
``hints`` attribute is signaled by the ``port-hints`` extension.
|
||||
The ``hints`` attribute is admin-only by default. Its value is a
|
||||
dict, keyed by mechanism driver aliases. The possible values are
|
||||
defined by the mechanism drivers. An admin user can ask for a
|
||||
hint in a port create or update request. As the name suggests a
|
||||
hint is not a demand - Neutron applies the hint when it can, but
|
||||
it is free to ignore it, when it can't.
|
@ -125,6 +125,7 @@ neutron.ml2.extension_drivers =
|
||||
subnet_dns_publish_fixed_ip = neutron.plugins.ml2.extensions.subnet_dns_publish_fixed_ip:SubnetDNSPublishFixedIPExtensionDriver
|
||||
dns_domain_keywords = neutron.plugins.ml2.extensions.dns_domain_keywords:DnsDomainKeywordsExtensionDriver
|
||||
port_hints = neutron.plugins.ml2.extensions.port_hints:PortHintsExtensionDriver
|
||||
port_hint_ovs_tx_steering = neutron.plugins.ml2.extensions.port_hint_ovs_tx_steering:PortHintOvsTxSteeringExtensionDriver
|
||||
neutron.ipam_drivers =
|
||||
fake = neutron.tests.unit.ipam.fake_driver:FakeDriver
|
||||
internal = neutron.ipam.drivers.neutrondb_ipam.driver:NeutronDbPool
|
||||
|
Loading…
Reference in New Issue
Block a user