diff mbox series

[API-NEXT,v5,3/7] api: ipsec: rename fragmentation mode option

Message ID 1517410819-24732-4-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v5,1/7] api: packet: add protocol type enumeration | expand

Commit Message

Github ODP bot Jan. 31, 2018, 3 p.m. UTC
From: Petri Savolainen <petri.savolainen@linaro.org>


Rename outbound operation fragmentation options to frag_mode.
Frag_mode is used elsewhere in the API and "mode" is too generic
term for it (not future proof).

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 403 (psavol:next-ipsec-tfc)
 ** https://github.com/Linaro/odp/pull/403
 ** Patch: https://github.com/Linaro/odp/pull/403.patch
 ** Base sha: 5718327018debbb02aacb464493504c95fbe57a3
 ** Merge commit sha: a8d85f63d9e1de7ba709e84b37a06e3482bdea1d
 **/
 include/odp/api/spec/ipsec.h               | 2 +-
 platform/linux-generic/odp_ipsec.c         | 2 +-
 test/validation/api/ipsec/ipsec_test_out.c | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index c78afbe3f..1060a3ee2 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -984,7 +984,7 @@  typedef struct odp_ipsec_op_flag_t {
  */
 typedef struct odp_ipsec_out_opt_t {
 	/** Fragmentation mode */
-	odp_ipsec_frag_mode_t mode;
+	odp_ipsec_frag_mode_t frag_mode;
 
 } odp_ipsec_out_opt_t;
 
diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c
index b6192377e..9f08b228c 100644
--- a/platform/linux-generic/odp_ipsec.c
+++ b/platform/linux-generic/odp_ipsec.c
@@ -1306,7 +1306,7 @@  static ipsec_sa_t *ipsec_out_single(odp_packet_t pkt,
 	ipsec_sa = _odp_ipsec_sa_use(sa);
 	ODP_ASSERT(NULL != ipsec_sa);
 
-	if ((opt && opt->mode == ODP_IPSEC_FRAG_CHECK) ||
+	if ((opt && opt->frag_mode == ODP_IPSEC_FRAG_CHECK) ||
 	    (!opt && ipsec_sa->out.frag_mode == ODP_IPSEC_FRAG_CHECK))
 		mtu = ipsec_sa->out.mtu;
 	else
diff --git a/test/validation/api/ipsec/ipsec_test_out.c b/test/validation/api/ipsec/ipsec_test_out.c
index 971fbbf8d..4940efa5a 100644
--- a/test/validation/api/ipsec/ipsec_test_out.c
+++ b/test/validation/api/ipsec/ipsec_test_out.c
@@ -530,7 +530,7 @@  static void test_out_ipv4_ah_sha256_frag_check(void)
 	ipsec_test_part test2 = {
 		.pkt_in = &pkt_ipv4_icmp_0,
 		.num_opt = 1,
-		.opt = { .mode = ODP_IPSEC_FRAG_DISABLED, },
+		.opt = { .frag_mode = ODP_IPSEC_FRAG_DISABLED, },
 		.out_pkt = 1,
 		.out = {
 			{ .status.warn.all = 0,
@@ -623,7 +623,7 @@  static void test_out_ipv4_esp_null_sha256_frag_check(void)
 	ipsec_test_part test2 = {
 		.pkt_in = &pkt_ipv4_icmp_0,
 		.num_opt = 1,
-		.opt = { .mode = ODP_IPSEC_FRAG_DISABLED, },
+		.opt = { .frag_mode = ODP_IPSEC_FRAG_DISABLED, },
 		.out_pkt = 1,
 		.out = {
 			{ .status.warn.all = 0,