~danielj-mellanox/ubuntu/+source/linux-bluefield/+git/focal:tls_bond

Last commit made on 2021-05-07
Get this branch:
git clone -b tls_bond https://git.launchpad.net/~danielj-mellanox/ubuntu/+source/linux-bluefield/+git/focal
Only Dan Jurgens can upload to this branch. If you are Dan Jurgens please log in for upload directions.

Branch merges

Branch information

Recent commits

e488b45... by Tariq Toukan <email address hidden>

net/tls: Except bond interface from some TLS checks

BugLink: https://bugs.launchpad.net/bugs/1926994

In the tls_dev_event handler, ignore tlsdev_ops requirement for bond
interfaces, they do not exist as the interaction is done directly with
the lower device.

Also, make the validate function pass when it's called with the upper
bond interface.

Signed-off-by: Tariq Toukan <email address hidden>
Reviewed-by: Boris Pismenny <email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(cherry picked from commit 4e5a73329051e5b24fb1d715a5417ef3f95b08a6)
Signed-off-by: Daniel Jurgens <email address hidden>

151a3de... by Tariq Toukan <email address hidden>

net/tls: Device offload to use lowest netdevice in chain

BugLink: https://bugs.launchpad.net/bugs/1926994

Do not call the tls_dev_ops of upper devices. Instead, ask them
for the proper lowest device and communicate with it directly.

Signed-off-by: Tariq Toukan <email address hidden>
Reviewed-by: Boris Pismenny <email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(cherry picked from commit 153cbd137f0ad9ee334fa805155b983e25a432e7)
Signed-off-by: Daniel Jurgens <email address hidden>

db2cbac... by Tariq Toukan <email address hidden>

net/bonding: Declare TLS RX device offload support

BugLink: https://bugs.launchpad.net/bugs/1926994

Following the description in previous patch (for TX):
As the bond interface is being bypassed by the TLS module, interacting
directly against the lower devs, there is no way for the bond interface
to disable its device offload capabilities, as long as the mode/policy
config allows it.
Hence, the feature flag is not directly controllable, but just reflects
the offload status based on the logic under bond_sk_check().

Here we just declare RX device offload support, and expose it via the
NETIF_F_HW_TLS_RX flag.

Signed-off-by: Tariq Toukan <email address hidden>
Reviewed-by: Boris Pismenny <email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(cherry picked from commit dc5809f9e2b674a489723bd8d0131c97e565ca8d)
Signed-off-by: Daniel Jurgens <email address hidden>

e2cf6f4... by Tariq Toukan <email address hidden>

net/bonding: Implement TLS TX device offload

BugLink: https://bugs.launchpad.net/bugs/1926994

Implement TLS TX device offload for bonding interfaces.
This allows kTLS sockets running on a bond to benefit from the
device offload on capable lower devices.

To allow a simple and fast maintenance of the TLS context in SW and
lower devices, we bind the TLS socket to a specific lower dev.
To achieve a behavior similar to SW kTLS, we support only balance-xor
and 802.3ad modes, with xmit_hash_policy=layer3+4. This is enforced
in bond_sk_check(), done in a previous patch.

For the above configuration, the SW implementation keeps picking the
same exact lower dev for all the socket's SKBs. The device offload
behaves similarly, making the decision once at the connection creation.

Per socket, the TLS module should work directly with the lowest netdev
in chain, to call the tls_dev_ops operations.

As the bond interface is being bypassed by the TLS module, interacting
directly against the lower devs, there is no way for the bond interface
to disable its device offload capabilities, as long as the mode/policy
config allows it.
Hence, the feature flag is not directly controllable, but just reflects
the current offload status based on the logic under bond_sk_check().

Signed-off-by: Tariq Toukan <email address hidden>
Reviewed-by: Boris Pismenny <email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(cherry picked from commit 89df6a8104706f94800ed527ad73d07465ea4d12)
Signed-off-by: Daniel Jurgens <email address hidden>

d011168... by Tariq Toukan <email address hidden>

net/bonding: Take update_features call out of XFRM funciton

BugLink: https://bugs.launchpad.net/bugs/1926994

In preparation for more cases that call netdev_update_features().

While here, move the features logic to the stage where struct bond
is already updated, and pass it as the only parameter to function
bond_set_xfrm_features().

Signed-off-by: Tariq Toukan <email address hidden>
Reviewed-by: Boris Pismenny <email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(cherry picked from commit f45583de361db2160fbca4a99c20a0c44b34f36a)
Signed-off-by: Daniel Jurgens <email address hidden>

ea21c8d... by Tariq Toukan <email address hidden>

net/bonding: Implement ndo_sk_get_lower_dev

BugLink: https://bugs.launchpad.net/bugs/1926994

Add ndo_sk_get_lower_dev() implementation for bond interfaces.

Support only for the cases where the socket's and SKBs' hash
yields identical value for the whole connection lifetime.

Here we restrict it to L3+4 sockets only, with
xmit_hash_policy==LAYER34 and bond modes xor/802.3ad.

Signed-off-by: Tariq Toukan <email address hidden>
Reviewed-by: Boris Pismenny <email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(cherry picked from commit 007feb87fb15933b5de7135e6bdf57c219b3fbec)
Signed-off-by: Daniel Jurgens <email address hidden>

427c206... by Tariq Toukan <email address hidden>

net/bonding: Take IP hash logic into a helper

BugLink: https://bugs.launchpad.net/bugs/1926994

Hash logic on L3 will be used in a downstream patch for one more use
case.
Take it to a function for a better code reuse.

Signed-off-by: Tariq Toukan <email address hidden>
Reviewed-by: Boris Pismenny <email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(backported from commit 5b99854540e35c2c6a226bcdb4bafbae1bccad5a)
Signed-off-by: Daniel Jurgens <email address hidden>

Conflicts:
 drivers/net/bonding/bond_main.c

833ad3c... by Tariq Toukan <email address hidden>

net: netdevice: Add operation ndo_sk_get_lower_dev

BugLink: https://bugs.launchpad.net/bugs/1926994

ndo_sk_get_lower_dev returns the lower netdev that corresponds to
a given socket.
Additionally, we implement a helper netdev_sk_get_lowest_dev() to get
the lowest one in chain.

Signed-off-by: Tariq Toukan <email address hidden>
Reviewed-by: Boris Pismenny <email address hidden>
Signed-off-by: Jakub Kicinski <email address hidden>
(cherry picked from commit 719a402cf60311b1cdff3f6320abaecdcc5e46b7)
Signed-off-by: Daniel Jurgens <email address hidden>

dc3f4b6... by Maor Gottlieb <email address hidden>

bonding: Implement ndo_get_xmit_slave

BugLink: https://bugs.launchpad.net/bugs/1926994

Add implementation of ndo_get_xmit_slave. Find the slave by using the
helper function according to the bond mode. If the caller set all_slaves
to true, then it assumes that all slaves are available to transmit.

Signed-off-by: Maor Gottlieb <email address hidden>
Reviewed-by: Jay Vosburgh <email address hidden>
Reviewed-by: Jiri Pirko <email address hidden>
Acked-by: David S. Miller <email address hidden>
Signed-off-by: Saeed Mahameed <email address hidden>
(cherry picked from commit 33720aaf8c2af5c0ff341a16b5048b9c7ecae569)
Signed-off-by: Daniel Jurgens <email address hidden>

eaf5ce9... by Maor Gottlieb <email address hidden>

bonding: Add array of all slaves

BugLink: https://bugs.launchpad.net/bugs/1926994

Keep all slaves in array so it could be used to get the xmit slave
assume all the slaves are active.
The logic to add slave to the array is like the usable slaves, except
that we also add slaves that currently can't transmit - not up or active.

Signed-off-by: Maor Gottlieb <email address hidden>
Reviewed-by: Jiri Pirko <email address hidden>
Reviewed-by: Jay Vosburgh <email address hidden>
Acked-by: David S. Miller <email address hidden>
Signed-off-by: Saeed Mahameed <email address hidden>
(cherry picked from commit 6b447e76ed44cc354cd0a346b86efe393e603e0d)
Signed-off-by: Daniel Jurgens <email address hidden>