public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 3/3] crypto: Replace old netlink helper functions with netlink contexts
Date: Mon, 13 Nov 2023 16:40:49 +0100	[thread overview]
Message-ID: <20231113154049.GB2223773@pevik> (raw)
In-Reply-To: <20231013151724.23057-4-mdoucha@suse.cz>

Hi Martin,

...
> +++ b/include/tst_crypto.h
> @@ -13,67 +13,13 @@
>  #define TST_CRYPTO_H

>  #include "lapi/cryptouser.h"
> -
> -/**
> - * A reference to a crypto session and associated state.
> - *
> - * Holds state relevant to a netlink crypto connection. The seq_num is used
> - * to tag each message sent to the netlink layer and is automatically
> - * incremented by the tst_crypto_ functions. When the netlink layer sends a
> - * response (ack) it will use the sequences number from the request.
> - *
> - * Some functions, such as delete ALG, may return EBUSY in which case it is
> - * safe to retry them. The retries field allows you to set the number of
> - * times this should be done. If set to zero the operation will only be tried
> - * once. For operations which do not return EBUSY, the field is ignored.
> - *
> - * Use TST_CRYPTO_SESSION_INIT to statically initialize this struct with sane
> - * defaults.
> - */
> -struct tst_crypto_session {
> -	/** File descriptor for the netlink socket */
> -	int fd;
> -	/** A sequence number used to identify responses from the kernel. */
> -	uint32_t seq_num;
> -	/** Number of times some operations will be retried. */
> -	uint32_t retries;
> -};

include/tst_crypto.h still contains "@relates tst_crypto_session". I guess this
should be replaced with "@relates tst_netlink_context", right?

I can fix this before merge.

...
> -/**
> - * Default static definition of tst_crypto_session.
> - *
> - * @relates tst_crypto_session
> - */
> -#define TST_CRYPTO_SESSION_INIT {\
> -	.fd = 0,                 \
> -	.seq_num = 0,            \
> -	.retries = 1000          \
I quite like this macro which had the default values.
But atm only retries 1000 is what needs to be specified, thus understand that
you didn't introduce any macro wrapper).

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2023-11-13 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13 15:17 [LTP] [PATCH 0/3] Netlink helper functions refactoring Martin Doucha
2023-10-13 15:17 ` [LTP] [PATCH 1/3] tst_rtnetlink: Refactor helper function for generic use Martin Doucha
2023-10-24  8:41   ` Petr Vorel
2023-10-13 15:17 ` [LTP] [PATCH 2/3] tst_netlink_destroy_context(): Allow safely passing NULL context Martin Doucha
2023-10-24  8:56   ` Petr Vorel
2023-10-13 15:17 ` [LTP] [PATCH 3/3] crypto: Replace old netlink helper functions with netlink contexts Martin Doucha
2023-11-13 15:40   ` Petr Vorel [this message]
2023-10-24  8:35 ` [LTP] [PATCH 0/3] Netlink helper functions refactoring Petr Vorel

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=20231113154049.GB2223773@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mdoucha@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox