MCPcopy Create free account
hub / github.com/F-Stack/f-stack / get_queue_index

Method get_queue_index

dpdk/usertools/dpdk-rss-flows.py:107–116  ·  view source on GitHub ↗
(self, packet: Packet)

Source from the content-addressed store, hash-verified

105 return hash_value.value
106
107 def get_queue_index(self, packet: Packet) -> int:
108 bytes_to_hash = packet.hash_data(self.use_l4_port)
109
110 # get the 32bit hash of the packet
111 hash_value = self.toeplitz_hash(bytes_to_hash)
112
113 # determine the offset in the redirection table
114 offset = hash_value & (len(self.reta) - 1)
115
116 return self.reta[offset]
117
118
119def balanced_traffic(

Callers 1

balanced_trafficFunction · 0.80

Calls 2

toeplitz_hashMethod · 0.95
hash_dataMethod · 0.80

Tested by

no test coverage detected