On 10-Jul-23 10:24 AM, Konstantin Ananyev wrote:
07/07/2023 14:26, Radu Nicolau пишет:
On 07-Jul-23 1:51 PM, Xiao Liang wrote:
sa->hdr_len and prm->tun.hdr_len don't include L2 length so both
should
start in the diagram at the end of the ETH header.
So the right way to compute datagram len
07/07/2023 14:26, Radu Nicolau пишет:
On 07-Jul-23 1:51 PM, Xiao Liang wrote:
sa->hdr_len and prm->tun.hdr_len don't include L2 length so both should
start in the diagram at the end of the ETH header.
So the right way to compute datagram length is
dgram_len = mb->pkt_len - sqh_len - sa->hdr_l
On 07-Jul-23 1:51 PM, Xiao Liang wrote:
sa->hdr_len and prm->tun.hdr_len don't include L2 length so both should
start in the diagram at the end of the ETH header.
So the right way to compute datagram length is
dgram_len = mb->pkt_len - sqh_len - sa->hdr_l3_off - sa->hdr_len +
sizeof(struct rt
The context
hlen = sa->hdr_len + sa->iv_len + sizeof(*esph);
...
ph = rte_pktmbuf_prepend(mb, hlen - l2len);
...
update_tun_outb_l3hdr(sa, ph + sa->hdr_l3_off, ph + hlen,
mb->pkt_len - sqh_len, sa->hdr_l3_off, sqn_low16(sqc));
assumes L2 header length included in sa->h
> sa->hdr_len and prm->tun.hdr_len don't include L2 length so both should
> start in the diagram at the end of the ETH header.
>
> So the right way to compute datagram length is
>
> dgram_len = mb->pkt_len - sqh_len - sa->hdr_l3_off - sa->hdr_len +
> sizeof(struct rte_udp_hdr)
>
|<- mb->
On 07-Jul-23 4:12 AM, Xiao Liang wrote:
|<- mb->pkt_len - sqh_len ->|
|<-sa->hdr_len->|
|<- sa->hdr_l3_off ->||<- udph->dgram_len ->|
+++-+-+-+-+
| ETH| IP
|<- mb->pkt_len - sqh_len ->|
|<-sa->hdr_len->|
|<- sa->hdr_l3_off ->||<- udph->dgram_len ->|
+++-+-+-+-+
| ETH| IP | UDP | ESP | payload | sqh |
+---
Well, let me explain.
> >>> diff --git a/lib/ipsec/esp_outb.c b/lib/ipsec/esp_outb.c
> >>> index 9cbd9202f6..ec87b1dce2 100644
> >>> --- a/lib/ipsec/esp_outb.c
> >>> +++ b/lib/ipsec/esp_outb.c
> >>> @@ -198,7 +198,7 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa,
> >>> rte_be64_t sqc,
> >>>
On 06-Jul-23 10:08 AM, Konstantin Ananyev wrote:
Hi Akhil,
Hi Konstantin,
Can you review this patch?
UDP header length is included in sa->hdr_len. Take care of that in
L3 header and pakcet length calculation.
Fixes: 01eef5907fc3 ("ipsec: support NAT-T")
Signed-off-by: Xiao Liang
---
li
Hi Akhil,
>
> Hi Konstantin,
> Can you review this patch?
>
> > UDP header length is included in sa->hdr_len. Take care of that in
> > L3 header and pakcet length calculation.
> >
> > Fixes: 01eef5907fc3 ("ipsec: support NAT-T")
> >
> > Signed-off-by: Xiao Liang
> > ---
> > lib/ipsec/esp_out
Hi Konstantin,
Can you review this patch?
> UDP header length is included in sa->hdr_len. Take care of that in
> L3 header and pakcet length calculation.
>
> Fixes: 01eef5907fc3 ("ipsec: support NAT-T")
>
> Signed-off-by: Xiao Liang
> ---
> lib/ipsec/esp_outb.c | 2 +-
> lib/ipsec/sa.c |
11 matches
Mail list logo