get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/53578/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 53578,
    "url": "https://patches.dpdk.org/api/patches/53578/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190521161315.25500-7-olivier.matz@6wind.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20190521161315.25500-7-olivier.matz@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190521161315.25500-7-olivier.matz@6wind.com",
    "date": "2019-05-21T16:13:06",
    "name": "[06/15] net: add rte prefix to esp structure",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "992bae920f65b59f81ce58883dbce1ed4263938d",
    "submitter": {
        "id": 8,
        "url": "https://patches.dpdk.org/api/people/8/?format=api",
        "name": "Olivier Matz",
        "email": "olivier.matz@6wind.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190521161315.25500-7-olivier.matz@6wind.com/mbox/",
    "series": [
        {
            "id": 4733,
            "url": "https://patches.dpdk.org/api/series/4733/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=4733",
            "date": "2019-05-21T16:13:01",
            "name": "prefix network structures",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/4733/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/53578/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/53578/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2FB945F1A;\n\tTue, 21 May 2019 18:13:40 +0200 (CEST)",
            "from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com\n\t[62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 2E4BE4C8B\n\tfor <dev@dpdk.org>; Tue, 21 May 2019 18:13:25 +0200 (CEST)",
            "from glumotte.dev.6wind.com. (unknown [10.16.0.195])\n\tby proxy.6wind.com (Postfix) with ESMTP id 130402B83D9;\n\tTue, 21 May 2019 18:13:25 +0200 (CEST)"
        ],
        "From": "Olivier Matz <olivier.matz@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "stephen@networkplumber.org,\n\tferruh.yigit@intel.com",
        "Date": "Tue, 21 May 2019 18:13:06 +0200",
        "Message-Id": "<20190521161315.25500-7-olivier.matz@6wind.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": "<20190521161315.25500-1-olivier.matz@6wind.com>",
        "References": "<20190410083218.17531-1-olivier.matz@6wind.com>\n\t<20190521161315.25500-1-olivier.matz@6wind.com>",
        "Subject": "[dpdk-dev] [PATCH 06/15] net: add rte prefix to esp structure",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add 'rte_' prefix to structures:\n- rename struct esp_hdr as struct rte_esp_hdr.\n\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\n---\n app/test/test_ipsec.c        |  4 ++--\n examples/ipsec-secgw/esp.c   | 47 +++++++++++++++++++++++---------------------\n examples/ipsec-secgw/sa.c    |  6 +++---\n lib/librte_ethdev/rte_flow.h |  2 +-\n lib/librte_ipsec/crypto.h    |  2 +-\n lib/librte_ipsec/esp_inb.c   | 10 +++++-----\n lib/librte_ipsec/esp_outb.c  |  8 ++++----\n lib/librte_ipsec/sa.c        | 10 ++++++----\n lib/librte_net/rte_esp.h     |  2 +-\n 9 files changed, 48 insertions(+), 43 deletions(-)",
    "diff": "diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c\nindex 64e56c056..4342b730b 100644\n--- a/app/test/test_ipsec.c\n+++ b/app/test/test_ipsec.c\n@@ -569,12 +569,12 @@ setup_test_string_tunneled(struct rte_mempool *mpool, const char *string,\n \tsize_t len, uint32_t spi, uint32_t seq)\n {\n \tstruct rte_mbuf *m = rte_pktmbuf_alloc(mpool);\n-\tuint32_t hdrlen = sizeof(struct ipv4_hdr) + sizeof(struct esp_hdr);\n+\tuint32_t hdrlen = sizeof(struct ipv4_hdr) + sizeof(struct rte_esp_hdr);\n \tuint32_t taillen = sizeof(struct esp_tail);\n \tuint32_t t_len = len + hdrlen + taillen;\n \tuint32_t padlen;\n \n-\tstruct esp_hdr esph  = {\n+\tstruct rte_esp_hdr esph  = {\n \t\t.spi = rte_cpu_to_be_32(spi),\n \t\t.seq = rte_cpu_to_be_32(seq)\n \t};\ndiff --git a/examples/ipsec-secgw/esp.c b/examples/ipsec-secgw/esp.c\nindex faa84ddd1..f11d095ba 100644\n--- a/examples/ipsec-secgw/esp.c\n+++ b/examples/ipsec-secgw/esp.c\n@@ -49,7 +49,7 @@ esp_inbound(struct rte_mbuf *m, struct ipsec_sa *sa,\n \t}\n \n \tpayload_len = rte_pktmbuf_pkt_len(m) - ip_hdr_len -\n-\t\tsizeof(struct esp_hdr) - sa->iv_len - sa->digest_len;\n+\t\tsizeof(struct rte_esp_hdr) - sa->iv_len - sa->digest_len;\n \n \tif ((payload_len & (sa->block_size - 1)) || (payload_len <= 0)) {\n \t\tRTE_LOG_DP(DEBUG, IPSEC_ESP, \"payload %d not multiple of %u\\n\",\n@@ -61,13 +61,14 @@ esp_inbound(struct rte_mbuf *m, struct ipsec_sa *sa,\n \tsym_cop->m_src = m;\n \n \tif (sa->aead_algo == RTE_CRYPTO_AEAD_AES_GCM) {\n-\t\tsym_cop->aead.data.offset =  ip_hdr_len + sizeof(struct esp_hdr) +\n-\t\t\tsa->iv_len;\n+\t\tsym_cop->aead.data.offset =\n+\t\t\tip_hdr_len + sizeof(struct rte_esp_hdr) + sa->iv_len;\n \t\tsym_cop->aead.data.length = payload_len;\n \n \t\tstruct cnt_blk *icb;\n \t\tuint8_t *aad;\n-\t\tuint8_t *iv = RTE_PTR_ADD(ip4, ip_hdr_len + sizeof(struct esp_hdr));\n+\t\tuint8_t *iv = RTE_PTR_ADD(ip4, ip_hdr_len +\n+\t\t\t\t\tsizeof(struct rte_esp_hdr));\n \n \t\ticb = get_cnt_blk(m);\n \t\ticb->salt = sa->salt;\n@@ -75,7 +76,7 @@ esp_inbound(struct rte_mbuf *m, struct ipsec_sa *sa,\n \t\ticb->cnt = rte_cpu_to_be_32(1);\n \n \t\taad = get_aad(m);\n-\t\tmemcpy(aad, iv - sizeof(struct esp_hdr), 8);\n+\t\tmemcpy(aad, iv - sizeof(struct rte_esp_hdr), 8);\n \t\tsym_cop->aead.aad.data = aad;\n \t\tsym_cop->aead.aad.phys_addr = rte_pktmbuf_iova_offset(m,\n \t\t\t\taad - rte_pktmbuf_mtod(m, uint8_t *));\n@@ -85,12 +86,14 @@ esp_inbound(struct rte_mbuf *m, struct ipsec_sa *sa,\n \t\tsym_cop->aead.digest.phys_addr = rte_pktmbuf_iova_offset(m,\n \t\t\t\trte_pktmbuf_pkt_len(m) - sa->digest_len);\n \t} else {\n-\t\tsym_cop->cipher.data.offset =  ip_hdr_len + sizeof(struct esp_hdr) +\n+\t\tsym_cop->cipher.data.offset =  ip_hdr_len +\n+\t\t\tsizeof(struct rte_esp_hdr) +\n \t\t\tsa->iv_len;\n \t\tsym_cop->cipher.data.length = payload_len;\n \n \t\tstruct cnt_blk *icb;\n-\t\tuint8_t *iv = RTE_PTR_ADD(ip4, ip_hdr_len + sizeof(struct esp_hdr));\n+\t\tuint8_t *iv = RTE_PTR_ADD(ip4, ip_hdr_len +\n+\t\t\t\t\tsizeof(struct rte_esp_hdr));\n \t\tuint8_t *iv_ptr = rte_crypto_op_ctod_offset(cop,\n \t\t\t\t\tuint8_t *, IV_OFFSET);\n \n@@ -118,7 +121,7 @@ esp_inbound(struct rte_mbuf *m, struct ipsec_sa *sa,\n \t\tcase RTE_CRYPTO_AUTH_SHA1_HMAC:\n \t\tcase RTE_CRYPTO_AUTH_SHA256_HMAC:\n \t\t\tsym_cop->auth.data.offset = ip_hdr_len;\n-\t\t\tsym_cop->auth.data.length = sizeof(struct esp_hdr) +\n+\t\t\tsym_cop->auth.data.length = sizeof(struct rte_esp_hdr) +\n \t\t\t\tsa->iv_len + payload_len;\n \t\t\tbreak;\n \t\tdefault:\n@@ -192,7 +195,7 @@ esp_inbound_post(struct rte_mbuf *m, struct ipsec_sa *sa,\n \tif (unlikely(sa->flags == TRANSPORT)) {\n \t\tip = rte_pktmbuf_mtod(m, struct ip *);\n \t\tip4 = (struct ip *)rte_pktmbuf_adj(m,\n-\t\t\t\tsizeof(struct esp_hdr) + sa->iv_len);\n+\t\t\t\tsizeof(struct rte_esp_hdr) + sa->iv_len);\n \t\tif (likely(ip->ip_v == IPVERSION)) {\n \t\t\tmemmove(ip4, ip, ip->ip_hl * 4);\n \t\t\tip4->ip_p = *nexthdr;\n@@ -206,7 +209,7 @@ esp_inbound_post(struct rte_mbuf *m, struct ipsec_sa *sa,\n \t\t\t\t\t      sizeof(struct ip6_hdr));\n \t\t}\n \t} else\n-\t\tipip_inbound(m, sizeof(struct esp_hdr) + sa->iv_len);\n+\t\tipip_inbound(m, sizeof(struct rte_esp_hdr) + sa->iv_len);\n \n \treturn 0;\n }\n@@ -217,7 +220,7 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa,\n {\n \tstruct ip *ip4;\n \tstruct ip6_hdr *ip6;\n-\tstruct esp_hdr *esp = NULL;\n+\tstruct rte_esp_hdr *esp = NULL;\n \tuint8_t *padding = NULL, *new_ip, nlp;\n \tstruct rte_crypto_sym_op *sym_cop;\n \tint32_t i;\n@@ -268,7 +271,7 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa,\n \t}\n \n \t/* Check maximum packet size */\n-\tif (unlikely(ip_hdr_len + sizeof(struct esp_hdr) + sa->iv_len +\n+\tif (unlikely(ip_hdr_len + sizeof(struct rte_esp_hdr) + sa->iv_len +\n \t\t\tpad_payload_len + sa->digest_len > IP_MAXPACKET)) {\n \t\tRTE_LOG(ERR, IPSEC_ESP, \"ipsec packet is too big\\n\");\n \t\treturn -EINVAL;\n@@ -290,20 +293,20 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa,\n \n \tswitch (sa->flags) {\n \tcase IP4_TUNNEL:\n-\t\tip4 = ip4ip_outbound(m, sizeof(struct esp_hdr) + sa->iv_len,\n+\t\tip4 = ip4ip_outbound(m, sizeof(struct rte_esp_hdr) + sa->iv_len,\n \t\t\t\t&sa->src, &sa->dst);\n-\t\tesp = (struct esp_hdr *)(ip4 + 1);\n+\t\tesp = (struct rte_esp_hdr *)(ip4 + 1);\n \t\tbreak;\n \tcase IP6_TUNNEL:\n-\t\tip6 = ip6ip_outbound(m, sizeof(struct esp_hdr) + sa->iv_len,\n+\t\tip6 = ip6ip_outbound(m, sizeof(struct rte_esp_hdr) + sa->iv_len,\n \t\t\t\t&sa->src, &sa->dst);\n-\t\tesp = (struct esp_hdr *)(ip6 + 1);\n+\t\tesp = (struct rte_esp_hdr *)(ip6 + 1);\n \t\tbreak;\n \tcase TRANSPORT:\n \t\tnew_ip = (uint8_t *)rte_pktmbuf_prepend(m,\n-\t\t\t\tsizeof(struct esp_hdr) + sa->iv_len);\n+\t\t\t\tsizeof(struct rte_esp_hdr) + sa->iv_len);\n \t\tmemmove(new_ip, ip4, ip_hdr_len);\n-\t\tesp = (struct esp_hdr *)(new_ip + ip_hdr_len);\n+\t\tesp = (struct rte_esp_hdr *)(new_ip + ip_hdr_len);\n \t\tip4 = (struct ip *)new_ip;\n \t\tif (likely(ip4->ip_v == IPVERSION)) {\n \t\t\tip4->ip_p = IPPROTO_ESP;\n@@ -362,7 +365,7 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa,\n \t\tuint8_t *aad;\n \n \t\tsym_cop->aead.data.offset = ip_hdr_len +\n-\t\t\tsizeof(struct esp_hdr) + sa->iv_len;\n+\t\t\tsizeof(struct rte_esp_hdr) + sa->iv_len;\n \t\tsym_cop->aead.data.length = pad_payload_len;\n \n \t\t/* Fill pad_len using default sequential scheme */\n@@ -392,12 +395,12 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa,\n \t\tcase RTE_CRYPTO_CIPHER_3DES_CBC:\n \t\tcase RTE_CRYPTO_CIPHER_AES_CBC:\n \t\t\tsym_cop->cipher.data.offset = ip_hdr_len +\n-\t\t\t\tsizeof(struct esp_hdr);\n+\t\t\t\tsizeof(struct rte_esp_hdr);\n \t\t\tsym_cop->cipher.data.length = pad_payload_len + sa->iv_len;\n \t\t\tbreak;\n \t\tcase RTE_CRYPTO_CIPHER_AES_CTR:\n \t\t\tsym_cop->cipher.data.offset = ip_hdr_len +\n-\t\t\t\tsizeof(struct esp_hdr) + sa->iv_len;\n+\t\t\t\tsizeof(struct rte_esp_hdr) + sa->iv_len;\n \t\t\tsym_cop->cipher.data.length = pad_payload_len;\n \t\t\tbreak;\n \t\tdefault:\n@@ -422,7 +425,7 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa,\n \t\tcase RTE_CRYPTO_AUTH_SHA1_HMAC:\n \t\tcase RTE_CRYPTO_AUTH_SHA256_HMAC:\n \t\t\tsym_cop->auth.data.offset = ip_hdr_len;\n-\t\t\tsym_cop->auth.data.length = sizeof(struct esp_hdr) +\n+\t\t\tsym_cop->auth.data.length = sizeof(struct rte_esp_hdr) +\n \t\t\t\tsa->iv_len + pad_payload_len;\n \t\t\tbreak;\n \t\tdefault:\ndiff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c\nindex b850e9839..c65dbe974 100644\n--- a/examples/ipsec-secgw/sa.c\n+++ b/examples/ipsec-secgw/sa.c\n@@ -1219,7 +1219,7 @@ static inline void\n single_inbound_lookup(struct ipsec_sa *sadb, struct rte_mbuf *pkt,\n \t\tstruct ipsec_sa **sa_ret)\n {\n-\tstruct esp_hdr *esp;\n+\tstruct rte_esp_hdr *esp;\n \tstruct ip *ip;\n \tuint32_t *src4_addr;\n \tuint8_t *src6_addr;\n@@ -1229,9 +1229,9 @@ single_inbound_lookup(struct ipsec_sa *sadb, struct rte_mbuf *pkt,\n \n \tip = rte_pktmbuf_mtod(pkt, struct ip *);\n \tif (ip->ip_v == IPVERSION)\n-\t\tesp = (struct esp_hdr *)(ip + 1);\n+\t\tesp = (struct rte_esp_hdr *)(ip + 1);\n \telse\n-\t\tesp = (struct esp_hdr *)(((struct ip6_hdr *)ip) + 1);\n+\t\tesp = (struct rte_esp_hdr *)(((struct ip6_hdr *)ip) + 1);\n \n \tif (esp->spi == INVALID_SPI)\n \t\treturn;\ndiff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h\nindex e87a70613..c8fa2720c 100644\n--- a/lib/librte_ethdev/rte_flow.h\n+++ b/lib/librte_ethdev/rte_flow.h\n@@ -915,7 +915,7 @@ static const struct rte_flow_item_gtp rte_flow_item_gtp_mask = {\n  * Matches an ESP header.\n  */\n struct rte_flow_item_esp {\n-\tstruct esp_hdr hdr; /**< ESP header definition. */\n+\tstruct rte_esp_hdr hdr; /**< ESP header definition. */\n };\n \n /** Default mask for RTE_FLOW_ITEM_TYPE_ESP. */\ndiff --git a/lib/librte_ipsec/crypto.h b/lib/librte_ipsec/crypto.h\nindex 45d4ef7bf..f8fbf8d4f 100644\n--- a/lib/librte_ipsec/crypto.h\n+++ b/lib/librte_ipsec/crypto.h\n@@ -47,7 +47,7 @@ struct aead_gcm_aad {\n } __attribute__((packed));\n \n struct gcm_esph_iv {\n-\tstruct esp_hdr esph;\n+\tstruct rte_esp_hdr esph;\n \tuint64_t iv;\n } __attribute__((packed));\n \ndiff --git a/lib/librte_ipsec/esp_inb.c b/lib/librte_ipsec/esp_inb.c\nindex 4e0e12a85..3e12ca103 100644\n--- a/lib/librte_ipsec/esp_inb.c\n+++ b/lib/librte_ipsec/esp_inb.c\n@@ -68,7 +68,7 @@ inb_cop_prepare(struct rte_crypto_op *cop,\n \n \talgo = sa->algo_type;\n \tivp = rte_pktmbuf_mtod_offset(mb, uint64_t *,\n-\t\tpofs + sizeof(struct esp_hdr));\n+\t\tpofs + sizeof(struct rte_esp_hdr));\n \n \t/* fill sym op fields */\n \tsop = cop->sym;\n@@ -139,9 +139,9 @@ inb_pkt_prepare(const struct rte_ipsec_sa *sa, const struct replay_sqn *rsn,\n \tuint64_t sqn;\n \tuint32_t clen, icv_ofs, plen;\n \tstruct rte_mbuf *ml;\n-\tstruct esp_hdr *esph;\n+\tstruct rte_esp_hdr *esph;\n \n-\tesph = rte_pktmbuf_mtod_offset(mb, struct esp_hdr *, hlen);\n+\tesph = rte_pktmbuf_mtod_offset(mb, struct rte_esp_hdr *, hlen);\n \n \t/*\n \t * retrieve and reconstruct SQN, then check it, then\n@@ -295,10 +295,10 @@ static inline void *\n tun_process_step2(struct rte_mbuf *mb, struct rte_mbuf *ml, uint32_t hlen,\n \tuint32_t adj, uint32_t tlen, uint32_t *sqn)\n {\n-\tconst struct esp_hdr *ph;\n+\tconst struct rte_esp_hdr *ph;\n \n \t/* read SQN value */\n-\tph = rte_pktmbuf_mtod_offset(mb, const struct esp_hdr *, hlen);\n+\tph = rte_pktmbuf_mtod_offset(mb, const struct rte_esp_hdr *, hlen);\n \tsqn[0] = ph->seq;\n \n \t/* cut of ICV, ESP tail and padding bytes */\ndiff --git a/lib/librte_ipsec/esp_outb.c b/lib/librte_ipsec/esp_outb.c\nindex c798bc4c4..862a9982d 100644\n--- a/lib/librte_ipsec/esp_outb.c\n+++ b/lib/librte_ipsec/esp_outb.c\n@@ -108,7 +108,7 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,\n {\n \tuint32_t clen, hlen, l2len, pdlen, pdofs, plen, tlen;\n \tstruct rte_mbuf *ml;\n-\tstruct esp_hdr *esph;\n+\tstruct rte_esp_hdr *esph;\n \tstruct esp_tail *espt;\n \tchar *ph, *pt;\n \tuint64_t *iv;\n@@ -156,7 +156,7 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,\n \t\t\tsqn_low16(sqc));\n \n \t/* update spi, seqn and iv */\n-\tesph = (struct esp_hdr *)(ph + sa->hdr_len);\n+\tesph = (struct rte_esp_hdr *)(ph + sa->hdr_len);\n \tiv = (uint64_t *)(esph + 1);\n \tcopy_iv(iv, ivp, sa->iv_len);\n \n@@ -275,7 +275,7 @@ outb_trs_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,\n \tuint8_t np;\n \tuint32_t clen, hlen, pdlen, pdofs, plen, tlen, uhlen;\n \tstruct rte_mbuf *ml;\n-\tstruct esp_hdr *esph;\n+\tstruct rte_esp_hdr *esph;\n \tstruct esp_tail *espt;\n \tchar *ph, *pt;\n \tuint64_t *iv;\n@@ -318,7 +318,7 @@ outb_trs_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc,\n \t\t\tIPPROTO_ESP);\n \n \t/* update spi, seqn and iv */\n-\tesph = (struct esp_hdr *)(ph + uhlen);\n+\tesph = (struct rte_esp_hdr *)(ph + uhlen);\n \tiv = (uint64_t *)(esph + 1);\n \tcopy_iv(iv, ivp, sa->iv_len);\n \ndiff --git a/lib/librte_ipsec/sa.c b/lib/librte_ipsec/sa.c\nindex 846e317fe..1cb71caa1 100644\n--- a/lib/librte_ipsec/sa.c\n+++ b/lib/librte_ipsec/sa.c\n@@ -233,7 +233,7 @@ esp_inb_init(struct rte_ipsec_sa *sa)\n \t/* these params may differ with new algorithms support */\n \tsa->ctp.auth.offset = 0;\n \tsa->ctp.auth.length = sa->icv_len - sa->sqh_len;\n-\tsa->ctp.cipher.offset = sizeof(struct esp_hdr) + sa->iv_len;\n+\tsa->ctp.cipher.offset = sizeof(struct rte_esp_hdr) + sa->iv_len;\n \tsa->ctp.cipher.length = sa->icv_len + sa->ctp.cipher.offset;\n }\n \n@@ -259,7 +259,8 @@ esp_outb_init(struct rte_ipsec_sa *sa, uint32_t hlen)\n \n \t/* these params may differ with new algorithms support */\n \tsa->ctp.auth.offset = hlen;\n-\tsa->ctp.auth.length = sizeof(struct esp_hdr) + sa->iv_len + sa->sqh_len;\n+\tsa->ctp.auth.length = sizeof(struct rte_esp_hdr) +\n+\t\tsa->iv_len + sa->sqh_len;\n \n \talgo_type = sa->algo_type;\n \n@@ -267,13 +268,14 @@ esp_outb_init(struct rte_ipsec_sa *sa, uint32_t hlen)\n \tcase ALGO_TYPE_AES_GCM:\n \tcase ALGO_TYPE_AES_CTR:\n \tcase ALGO_TYPE_NULL:\n-\t\tsa->ctp.cipher.offset = hlen + sizeof(struct esp_hdr) +\n+\t\tsa->ctp.cipher.offset = hlen + sizeof(struct rte_esp_hdr) +\n \t\t\tsa->iv_len;\n \t\tsa->ctp.cipher.length = 0;\n \t\tbreak;\n \tcase ALGO_TYPE_AES_CBC:\n \tcase ALGO_TYPE_3DES_CBC:\n-\t\tsa->ctp.cipher.offset = sa->hdr_len + sizeof(struct esp_hdr);\n+\t\tsa->ctp.cipher.offset = sa->hdr_len +\n+\t\t\tsizeof(struct rte_esp_hdr);\n \t\tsa->ctp.cipher.length = sa->iv_len;\n \t\tbreak;\n \t}\ndiff --git a/lib/librte_net/rte_esp.h b/lib/librte_net/rte_esp.h\nindex 8e1b3d2dd..c569b7906 100644\n--- a/lib/librte_net/rte_esp.h\n+++ b/lib/librte_net/rte_esp.h\n@@ -20,7 +20,7 @@ extern \"C\" {\n /**\n  * ESP Header\n  */\n-struct esp_hdr {\n+struct rte_esp_hdr {\n \trte_be32_t spi;  /**< Security Parameters Index */\n \trte_be32_t seq;  /**< packet sequence number */\n } __attribute__((__packed__));\n",
    "prefixes": [
        "06/15"
    ]
}