Rename struct tls_device to struct tls_toe_device to avoid
confusion with normal, non-TOE offload.

No functional changes.

Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com>
Reviewed-by: John Hurley <john.hur...@netronome.com>
Reviewed-by: Simon Horman <simon.hor...@netronome.com>
---
 drivers/crypto/chelsio/chtls/chtls.h      |  4 ++--
 drivers/crypto/chelsio/chtls/chtls_main.c | 20 +++++++++----------
 include/net/tls_toe.h                     | 24 +++++++++++------------
 net/tls/tls_main.c                        | 14 ++++++-------
 4 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/drivers/crypto/chelsio/chtls/chtls.h 
b/drivers/crypto/chelsio/chtls/chtls.h
index e353c42fea91..d2bc655ab931 100644
--- a/drivers/crypto/chelsio/chtls/chtls.h
+++ b/drivers/crypto/chelsio/chtls/chtls.h
@@ -119,7 +119,7 @@ struct tls_scmd {
 };
 
 struct chtls_dev {
-       struct tls_device tlsdev;
+       struct tls_toe_device tlsdev;
        struct list_head list;
        struct cxgb4_lld_info *lldi;
        struct pci_dev *pdev;
@@ -363,7 +363,7 @@ enum {
 #define TCP_PAGE(sk)   (sk->sk_frag.page)
 #define TCP_OFF(sk)    (sk->sk_frag.offset)
 
-static inline struct chtls_dev *to_chtls_dev(struct tls_device *tlsdev)
+static inline struct chtls_dev *to_chtls_dev(struct tls_toe_device *tlsdev)
 {
        return container_of(tlsdev, struct chtls_dev, tlsdev);
 }
diff --git a/drivers/crypto/chelsio/chtls/chtls_main.c 
b/drivers/crypto/chelsio/chtls/chtls_main.c
index e6df5b95ed47..18996935d8ba 100644
--- a/drivers/crypto/chelsio/chtls/chtls_main.c
+++ b/drivers/crypto/chelsio/chtls/chtls_main.c
@@ -124,7 +124,7 @@ static void chtls_stop_listen(struct chtls_dev *cdev, 
struct sock *sk)
        mutex_unlock(&notify_mutex);
 }
 
-static int chtls_inline_feature(struct tls_device *dev)
+static int chtls_inline_feature(struct tls_toe_device *dev)
 {
        struct net_device *netdev;
        struct chtls_dev *cdev;
@@ -140,7 +140,7 @@ static int chtls_inline_feature(struct tls_device *dev)
        return 0;
 }
 
-static int chtls_create_hash(struct tls_device *dev, struct sock *sk)
+static int chtls_create_hash(struct tls_toe_device *dev, struct sock *sk)
 {
        struct chtls_dev *cdev = to_chtls_dev(dev);
 
@@ -149,7 +149,7 @@ static int chtls_create_hash(struct tls_device *dev, struct 
sock *sk)
        return 0;
 }
 
-static void chtls_destroy_hash(struct tls_device *dev, struct sock *sk)
+static void chtls_destroy_hash(struct tls_toe_device *dev, struct sock *sk)
 {
        struct chtls_dev *cdev = to_chtls_dev(dev);
 
@@ -161,7 +161,7 @@ static void chtls_free_uld(struct chtls_dev *cdev)
 {
        int i;
 
-       tls_unregister_device(&cdev->tlsdev);
+       tls_toe_unregister_device(&cdev->tlsdev);
        kvfree(cdev->kmap.addr);
        idr_destroy(&cdev->hwtid_idr);
        for (i = 0; i < (1 << RSPQ_HASH_BITS); i++)
@@ -173,27 +173,27 @@ static void chtls_free_uld(struct chtls_dev *cdev)
 
 static inline void chtls_dev_release(struct kref *kref)
 {
+       struct tls_toe_device *dev;
        struct chtls_dev *cdev;
-       struct tls_device *dev;
 
-       dev = container_of(kref, struct tls_device, kref);
+       dev = container_of(kref, struct tls_toe_device, kref);
        cdev = to_chtls_dev(dev);
        chtls_free_uld(cdev);
 }
 
 static void chtls_register_dev(struct chtls_dev *cdev)
 {
-       struct tls_device *tlsdev = &cdev->tlsdev;
+       struct tls_toe_device *tlsdev = &cdev->tlsdev;
 
-       strlcpy(tlsdev->name, "chtls", TLS_DEVICE_NAME_MAX);
+       strlcpy(tlsdev->name, "chtls", TLS_TOE_DEVICE_NAME_MAX);
        strlcat(tlsdev->name, cdev->lldi->ports[0]->name,
-               TLS_DEVICE_NAME_MAX);
+               TLS_TOE_DEVICE_NAME_MAX);
        tlsdev->feature = chtls_inline_feature;
        tlsdev->hash = chtls_create_hash;
        tlsdev->unhash = chtls_destroy_hash;
        tlsdev->release = chtls_dev_release;
        kref_init(&tlsdev->kref);
-       tls_register_device(tlsdev);
+       tls_toe_register_device(tlsdev);
        cdev->cdev_state = CHTLS_CDEV_STATE_UP;
 }
 
diff --git a/include/net/tls_toe.h b/include/net/tls_toe.h
index 81b66c76b31f..b56d30a5bd6d 100644
--- a/include/net/tls_toe.h
+++ b/include/net/tls_toe.h
@@ -36,7 +36,7 @@
 
 struct sock;
 
-#define TLS_DEVICE_NAME_MAX            32
+#define TLS_TOE_DEVICE_NAME_MAX                32
 
 /*
  * This structure defines the routines for Inline TLS driver.
@@ -45,29 +45,29 @@ struct sock;
  *
  * @name: Its the name of registered Inline tls device
  * @dev_list: Inline tls device list
- * int (*feature)(struct tls_device *device);
+ * int (*feature)(struct tls_toe_device *device);
  *     Called to return Inline TLS driver capability
  *
- * int (*hash)(struct tls_device *device, struct sock *sk);
+ * int (*hash)(struct tls_toe_device *device, struct sock *sk);
  *     This function sets Inline driver for listen and program
  *     device specific functioanlity as required
  *
- * void (*unhash)(struct tls_device *device, struct sock *sk);
+ * void (*unhash)(struct tls_toe_device *device, struct sock *sk);
  *     This function cleans listen state set by Inline TLS driver
  *
  * void (*release)(struct kref *kref);
  *     Release the registered device and allocated resources
- * @kref: Number of reference to tls_device
+ * @kref: Number of reference to tls_toe_device
  */
-struct tls_device {
-       char name[TLS_DEVICE_NAME_MAX];
+struct tls_toe_device {
+       char name[TLS_TOE_DEVICE_NAME_MAX];
        struct list_head dev_list;
-       int  (*feature)(struct tls_device *device);
-       int  (*hash)(struct tls_device *device, struct sock *sk);
-       void (*unhash)(struct tls_device *device, struct sock *sk);
+       int  (*feature)(struct tls_toe_device *device);
+       int  (*hash)(struct tls_toe_device *device, struct sock *sk);
+       void (*unhash)(struct tls_toe_device *device, struct sock *sk);
        void (*release)(struct kref *kref);
        struct kref kref;
 };
 
-void tls_register_device(struct tls_device *device);
-void tls_unregister_device(struct tls_device *device);
+void tls_toe_register_device(struct tls_toe_device *device);
+void tls_toe_unregister_device(struct tls_toe_device *device);
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c
index a19c6a1e034a..a1203807a3ef 100644
--- a/net/tls/tls_main.c
+++ b/net/tls/tls_main.c
@@ -657,8 +657,8 @@ static void tls_hw_sk_destruct(struct sock *sk)
 
 static int tls_hw_prot(struct sock *sk)
 {
+       struct tls_toe_device *dev;
        struct tls_context *ctx;
-       struct tls_device *dev;
        int rc = 0;
 
        spin_lock_bh(&device_spinlock);
@@ -688,7 +688,7 @@ static int tls_hw_prot(struct sock *sk)
 static void tls_hw_unhash(struct sock *sk)
 {
        struct tls_context *ctx = tls_get_ctx(sk);
-       struct tls_device *dev;
+       struct tls_toe_device *dev;
 
        spin_lock_bh(&device_spinlock);
        list_for_each_entry(dev, &device_list, dev_list) {
@@ -707,7 +707,7 @@ static void tls_hw_unhash(struct sock *sk)
 static int tls_hw_hash(struct sock *sk)
 {
        struct tls_context *ctx = tls_get_ctx(sk);
-       struct tls_device *dev;
+       struct tls_toe_device *dev;
        int err;
 
        err = ctx->sk_proto->hash(sk);
@@ -878,21 +878,21 @@ static size_t tls_get_info_size(const struct sock *sk)
        return size;
 }
 
-void tls_register_device(struct tls_device *device)
+void tls_toe_register_device(struct tls_toe_device *device)
 {
        spin_lock_bh(&device_spinlock);
        list_add_tail(&device->dev_list, &device_list);
        spin_unlock_bh(&device_spinlock);
 }
-EXPORT_SYMBOL(tls_register_device);
+EXPORT_SYMBOL(tls_toe_register_device);
 
-void tls_unregister_device(struct tls_device *device)
+void tls_toe_unregister_device(struct tls_toe_device *device)
 {
        spin_lock_bh(&device_spinlock);
        list_del(&device->dev_list);
        spin_unlock_bh(&device_spinlock);
 }
-EXPORT_SYMBOL(tls_unregister_device);
+EXPORT_SYMBOL(tls_toe_unregister_device);
 
 static struct tcp_ulp_ops tcp_tls_ulp_ops __read_mostly = {
        .name                   = "tls",
-- 
2.21.0

Reply via email to