#NEWLINE# @ staticmethod #NEWLINE# def _generate_dpdk_cpu_pinning( serialized_node , cpus ) : #NEWLINE# #INDENT# if ( not cpus ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# ovs_core_mask = ( 1 << core_masks [ 0 ] ) #NEWLINE# ovs_pmd_core_mask = 0 #NEWLINE# for cpu in cpus [ 1 : ] : #NEWLINE# #INDENT# ovs_pmd_core_mask |= ( 1 << cpu ) #NEWLINE# #UNINDENT# core_masks = { #NEWLINE# #INDENT# 'ovs_core_mask' : hex ( ovs_core_mask ) , #NEWLINE# #UNINDENT# } #NEWLINE# if ( ovs_pmd_core_mask > 0 ) : #NEWLINE# #INDENT# core_masks [ 'ovs_pmd_core_mask' ] = hex ( ovs_pmd_core_mask ) #NEWLINE# #UNINDENT# serialized_node . setdefault ( 'dpdk' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . update ( core_masks )