Toeplitz hash python
Hem / Teknik & Digitalt / Toeplitz hash python
The function expects the to be exactly the same as the one installed on the NIC. The function is a faster implementation, but it expects to be converted to the host byte order.
The last two functions are vectorized implementations using Galois Fields New Instructions. Only the functions sto_sl and cto_sl (solve linear Toeplitz systems) are tested.
The original, true, correct version of TOEPLITZ is available in the TOEPLITZ subdirectory of the NETLIB web site.
This wrapper is based on numpy/f2py and provides a python interface for all fortran subroutines *_sl. For more documentation than on John Burkardt’s website check the source file toeplitz.f90.
Installation
Toeplitz can be installed with the command pip toeplitz.
In the following we will consider a SNAT application.
Packets of a single bidirectional flow belonging to different directions can end up being assigned to different queues and thus processed by different lcores, as shown in Fig. 1.4:
That leads to a situation where the same packet flow can be shared between two cores.
The TOEPLITZ package was written in the early 1980's by a joint working group of American and Soviet mathematicians. They expect the tuple to be in network byte order.
calculates the hash value for a single tuple, and bulk implementation of the rte_thash_gfni().
takes the parameters:
A pointer to the matrices derived from the RSS hash key using .
A pointer to the tuple.
A length of the tuple in bytes.
takes the parameters:
A pointer to the matrices derived from the RSS hash key using .
A length of the longest tuple in bytes.
Array of the pointers on data to be hashed.
Array of where to put calculated Toeplitz hash values
Number of tuples in a bulk.
is a function that calculates matrices required by GFNI implementations from the RSS hash key.
They are not the recommended installation method.
Ubuntu and Debian#
Using :
Fedora#
Using :
macOS#
macOS doesn’t have a preinstalled package manager, but you can install Homebrew and use it to install SciPy (and Python itself):
A word of warning: building SciPy from source can be a nontrivial exercise.
They provide acceptable accuracy compared to scipy.linalg and run faster for large inputs. They install packages for the entire computer, often use older versions, and don’t have as many available versions. *//* Create and initialize a new thash context.
You can also install SciPy and as a single package, via the extra on PyPI, or the package on conda-forge. These workflows are well-established, but lack some reproducibility benefits of project-based workflows.
Installing with #
Install Python.
Create and activate a virtual environment with .
- Install SciPy, using :
Installing with #
Miniforge is the recommended way to install and , two Conda-based environment managers.
To get a specific version of SciPy (such as ), you should install version , for example:
Please direct questions about static typing support to the GitHub repository.
Installing with Type Stubs#
*/uint16_tnew_sport=tuple.v4.sport^adj;/* Make an actual packet translation. For details on how to build from source, see the building from source guide in the SciPy docs.