X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=blobdiff_plain;f=lib%2Flibrte_ipsec%2Fsa.c;h=1cb71caa1290623aea56ab227cffbdb64a922d1a;hp=846e317fe0e680d488ddd954a1b51a47aebdf916;hb=5ef2546767525c8a4a3c2bc60357b23c3dffcf6b;hpb=35b2d13fd6fdcbd191f2a30d74648faeb1186c65 diff --git a/lib/librte_ipsec/sa.c b/lib/librte_ipsec/sa.c index 846e317fe0..1cb71caa12 100644 --- a/lib/librte_ipsec/sa.c +++ b/lib/librte_ipsec/sa.c @@ -233,7 +233,7 @@ esp_inb_init(struct rte_ipsec_sa *sa) /* these params may differ with new algorithms support */ sa->ctp.auth.offset = 0; sa->ctp.auth.length = sa->icv_len - sa->sqh_len; - sa->ctp.cipher.offset = sizeof(struct esp_hdr) + sa->iv_len; + sa->ctp.cipher.offset = sizeof(struct rte_esp_hdr) + sa->iv_len; sa->ctp.cipher.length = sa->icv_len + sa->ctp.cipher.offset; } @@ -259,7 +259,8 @@ esp_outb_init(struct rte_ipsec_sa *sa, uint32_t hlen) /* these params may differ with new algorithms support */ sa->ctp.auth.offset = hlen; - sa->ctp.auth.length = sizeof(struct esp_hdr) + sa->iv_len + sa->sqh_len; + sa->ctp.auth.length = sizeof(struct rte_esp_hdr) + + sa->iv_len + sa->sqh_len; algo_type = sa->algo_type; @@ -267,13 +268,14 @@ esp_outb_init(struct rte_ipsec_sa *sa, uint32_t hlen) case ALGO_TYPE_AES_GCM: case ALGO_TYPE_AES_CTR: case ALGO_TYPE_NULL: - sa->ctp.cipher.offset = hlen + sizeof(struct esp_hdr) + + sa->ctp.cipher.offset = hlen + sizeof(struct rte_esp_hdr) + sa->iv_len; sa->ctp.cipher.length = 0; break; case ALGO_TYPE_AES_CBC: case ALGO_TYPE_3DES_CBC: - sa->ctp.cipher.offset = sa->hdr_len + sizeof(struct esp_hdr); + sa->ctp.cipher.offset = sa->hdr_len + + sizeof(struct rte_esp_hdr); sa->ctp.cipher.length = sa->iv_len; break; }