I'm lurking in crypto(9) and I found 'cryptocap' structure has unused
members. Do we want to keep them or they could gone?

We don't export this structure so this diff doesn't break ABI.

Index: sys/crypto/crypto.c
===================================================================
RCS file: /cvs/src/sys/crypto/crypto.c,v
retrieving revision 1.82
diff -u -p -r1.82 crypto.c
--- sys/crypto/crypto.c 30 Mar 2020 17:48:39 -0000      1.82
+++ sys/crypto/crypto.c 18 Jun 2021 20:13:52 -0000
@@ -431,9 +431,6 @@ crypto_invoke(struct cryptop *crp)
        if (crypto_drivers[hid].cc_process == NULL)
                goto migrate;
 
-       crypto_drivers[hid].cc_operations++;
-       crypto_drivers[hid].cc_bytes += crp->crp_ilen;
-
        error = crypto_drivers[hid].cc_process(crp);
        if (error) {
                if (error == ERESTART) {
Index: sys/crypto/cryptodev.h
===================================================================
RCS file: /cvs/src/sys/crypto/cryptodev.h,v
retrieving revision 1.71
diff -u -p -r1.71 cryptodev.h
--- sys/crypto/cryptodev.h      10 Aug 2017 18:57:20 -0000      1.71
+++ sys/crypto/cryptodev.h      18 Jun 2021 20:13:52 -0000
@@ -195,17 +195,9 @@ struct cryptop {
 
 /* Crypto capabilities structure */
 struct cryptocap {
-       u_int64_t       cc_operations;  /* Counter of how many ops done */
-       u_int64_t       cc_bytes;       /* Counter of how many bytes done */
-       u_int64_t       cc_koperations; /* How many PK ops done */
-
        u_int32_t       cc_sessions;    /* How many sessions allocated */
-
        /* Symmetric/hash algorithms supported */
        int             cc_alg[CRYPTO_ALGORITHM_MAX + 1];
-
-       int             cc_queued;      /* Operations queued */
-
        u_int8_t        cc_flags;
 #define CRYPTOCAP_F_CLEANUP     0x01
 #define CRYPTOCAP_F_SOFTWARE    0x02

Reply via email to