diff mbox series

[API-NEXT,v3,2/6] api: ipsec: rename fragmentation mode option

Message ID 1516892418-5660-3-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [API-NEXT,v3,1/6] api: ipsec: IP header parameter types | expand

Commit Message

Github ODP bot Jan. 25, 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: 44974a09b01c79adb9637a5dff38539598a76737
 ** Merge commit sha: acecf073764f87bfadb64c598703458d344b39f4
 **/
 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,