os-vif/os_vif/utils.py
Adrian Chiris bb5e51309e Revert "[Follow Up] OVS DPDK port representors support"
it seems that relevant OVS patches still did not land [1][2].
I think we should revert and wait for the patches to merge first,
then we can go ahead and merge in os-vif with release note that states
the exact OVS version required.

[1] https://patchwork.ozlabs.org/patch/1186896/
[2] https://patchwork.ozlabs.org/patch/1215075/

This reverts commit 399e355088.

Change-Id: I7cd6112b3b35a6971d3d354abae7652344ed1c97
2020-01-22 14:39:55 +00:00

20 lines
713 B
Python

# 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.
def set_mask(data, mask):
return data | mask
def unset_mask(data, mask, bit_size=32):
return data & ((2 ** bit_size - 1) ^ mask)