struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);
uint32_t hdrlen = sizeof(struct rte_ipv4_hdr) +
sizeof(struct rte_esp_hdr);
- uint32_t taillen = sizeof(struct esp_tail);
+ uint32_t taillen = sizeof(struct rte_esp_tail);
uint32_t t_len = len + hdrlen + taillen;
uint32_t padlen;
padlen = RTE_ALIGN(t_len, 4) - t_len;
t_len += padlen;
- struct esp_tail espt = {
+ struct rte_esp_tail espt = {
.pad_len = padlen,
.next_proto = IPPROTO_IPIP,
};
*/
static inline void
process_step1(struct rte_mbuf *mb, uint32_t tlen, struct rte_mbuf **ml,
- struct esp_tail *espt, uint32_t *hlen, uint32_t *tofs)
+ struct rte_esp_tail *espt, uint32_t *hlen, uint32_t *tofs)
{
- const struct esp_tail *pt;
+ const struct rte_esp_tail *pt;
uint32_t ofs;
ofs = mb->pkt_len - tlen;
hlen[0] = mb->l2_len + mb->l3_len;
ml[0] = mbuf_get_seg_ofs(mb, &ofs);
- pt = rte_pktmbuf_mtod_offset(ml[0], const struct esp_tail *, ofs);
+ pt = rte_pktmbuf_mtod_offset(ml[0], const struct rte_esp_tail *, ofs);
tofs[0] = ofs;
espt[0] = pt[0];
}
*/
static inline int32_t
trs_process_check(struct rte_mbuf *mb, struct rte_mbuf **ml,
- uint32_t *tofs, struct esp_tail espt, uint32_t hlen, uint32_t tlen)
+ uint32_t *tofs, struct rte_esp_tail espt, uint32_t hlen, uint32_t tlen)
{
if ((mb->ol_flags & PKT_RX_SEC_OFFLOAD_FAILED) != 0 ||
tlen + hlen > mb->pkt_len)
*/
static inline int32_t
tun_process_check(struct rte_mbuf *mb, struct rte_mbuf **ml,
- uint32_t *tofs, struct esp_tail espt, uint32_t hlen, uint32_t tlen,
+ uint32_t *tofs, struct rte_esp_tail espt, uint32_t hlen, uint32_t tlen,
uint8_t proto)
{
return (trs_process_check(mb, ml, tofs, espt, hlen, tlen) ||
{
uint32_t adj, i, k, tl;
uint32_t hl[num], to[num];
- struct esp_tail espt[num];
+ struct rte_esp_tail espt[num];
struct rte_mbuf *ml[num];
const void *outh;
void *inh;
char *np;
uint32_t i, k, l2, tl;
uint32_t hl[num], to[num];
- struct esp_tail espt[num];
+ struct rte_esp_tail espt[num];
struct rte_mbuf *ml[num];
/*
uint32_t clen, hlen, l2len, pdlen, pdofs, plen, tlen;
struct rte_mbuf *ml;
struct rte_esp_hdr *esph;
- struct esp_tail *espt;
+ struct rte_esp_tail *espt;
char *ph, *pt;
uint64_t *iv;
rte_memcpy(pt, esp_pad_bytes, pdlen);
/* update esp trailer */
- espt = (struct esp_tail *)(pt + pdlen);
+ espt = (struct rte_esp_tail *)(pt + pdlen);
espt->pad_len = pdlen;
espt->next_proto = sa->proto;
uint32_t clen, hlen, pdlen, pdofs, plen, tlen, uhlen;
struct rte_mbuf *ml;
struct rte_esp_hdr *esph;
- struct esp_tail *espt;
+ struct rte_esp_tail *espt;
char *ph, *pt;
uint64_t *iv;
rte_memcpy(pt, esp_pad_bytes, pdlen);
/* update esp trailer */
- espt = (struct esp_tail *)(pt + pdlen);
+ espt = (struct rte_esp_tail *)(pt + pdlen);
espt->pad_len = pdlen;
espt->next_proto = np;