All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Ilya Lesokhin <ilyal@mellanox.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, davejwatson@fb.com,
	tom@herbertland.com, borisp@mellanox.com, aviadye@mellanox.com,
	liranl@mellanox.com
Subject: Re: [PATCH net-next 5/5] tls: Add generic NIC offload infrastructure.
Date: Mon, 18 Sep 2017 16:52:21 +0200	[thread overview]
Message-ID: <87poaocb4q.fsf@stressinduktion.org> (raw)
In-Reply-To: <1505385988-94522-6-git-send-email-ilyal@mellanox.com> (Ilya Lesokhin's message of "Thu, 14 Sep 2017 13:46:28 +0300")

Ilya Lesokhin <ilyal@mellanox.com> writes:

> +/* We assume that the socket is already connected */
> +static struct net_device *get_netdev_for_sock(struct sock *sk)
> +{
> +	struct inet_sock *inet = inet_sk(sk);
> +	struct net_device *netdev = NULL;
> +
> +	netdev = dev_get_by_index(sock_net(sk), inet->cork.fl.flowi_oif);
> +
> +	return netdev;
> +}

The user should be aware of that they can't migrate the socket to
another interface if they got hw offloaded. This is not the case for
software offload. Thus I think the user has to opt in and it shouldn't
be a heuristic until we can switch back to sw offload path.

Maybe change flowi_oif to sk_bound_dev_if and somwhow lock it against
further changes if hw tls is in use?

Thanks,
Hannes

  reply	other threads:[~2017-09-18 14:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-14 10:46 [PATCH net-next 0/5] tls: Add generic NIC offload infrastructure Ilya Lesokhin
2017-09-14 10:46 ` [PATCH net-next 1/5] tls: Move release of tls_ctx into tls_sw_free_resources Ilya Lesokhin
2017-09-14 10:46 ` [PATCH net-next 2/5] tcp: Add clean acked data hook Ilya Lesokhin
2017-09-14 10:46 ` [PATCH net-next 3/5] net: Add TLS offload netdev ops Ilya Lesokhin
2017-09-14 10:46 ` [PATCH net-next 4/5] net: Add TLS TX offload features Ilya Lesokhin
2017-09-14 10:46 ` [PATCH net-next 5/5] tls: Add generic NIC offload infrastructure Ilya Lesokhin
2017-09-18 14:52   ` Hannes Frederic Sowa [this message]
2017-09-19  7:36     ` Ilya Lesokhin
2017-09-19  9:40       ` Hannes Frederic Sowa
2017-09-19 14:02         ` Boris Pismenny
2017-09-20 15:16           ` Hannes Frederic Sowa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87poaocb4q.fsf@stressinduktion.org \
    --to=hannes@stressinduktion.org \
    --cc=aviadye@mellanox.com \
    --cc=borisp@mellanox.com \
    --cc=davejwatson@fb.com \
    --cc=davem@davemloft.net \
    --cc=ilyal@mellanox.com \
    --cc=liranl@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.