mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
xfrm: Use the XFRM_GRO to indicate a GRO call on input
This is needed to support GRO for ESP in UDP encapsulation. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Co-developed-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Antony Antony <antony.antony@secunet.com> Reviewed-by: Eyal Birger <eyal.birger@gmail.com>
This commit is contained in:
parent
1d495f1c89
commit
b439475a0d
|
@ -77,7 +77,7 @@ static struct sk_buff *esp4_gro_receive(struct list_head *head,
|
||||||
|
|
||||||
/* We don't need to handle errors from xfrm_input, it does all
|
/* We don't need to handle errors from xfrm_input, it does all
|
||||||
* the error handling and frees the resources on error. */
|
* the error handling and frees the resources on error. */
|
||||||
xfrm_input(skb, IPPROTO_ESP, spi, -2);
|
xfrm_input(skb, IPPROTO_ESP, spi, 0);
|
||||||
|
|
||||||
return ERR_PTR(-EINPROGRESS);
|
return ERR_PTR(-EINPROGRESS);
|
||||||
out_reset:
|
out_reset:
|
||||||
|
|
|
@ -104,7 +104,7 @@ static struct sk_buff *esp6_gro_receive(struct list_head *head,
|
||||||
|
|
||||||
/* We don't need to handle errors from xfrm_input, it does all
|
/* We don't need to handle errors from xfrm_input, it does all
|
||||||
* the error handling and frees the resources on error. */
|
* the error handling and frees the resources on error. */
|
||||||
xfrm_input(skb, IPPROTO_ESP, spi, -2);
|
xfrm_input(skb, IPPROTO_ESP, spi, 0);
|
||||||
|
|
||||||
return ERR_PTR(-EINPROGRESS);
|
return ERR_PTR(-EINPROGRESS);
|
||||||
out_reset:
|
out_reset:
|
||||||
|
|
|
@ -462,7 +462,7 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
|
||||||
struct xfrm_offload *xo = xfrm_offload(skb);
|
struct xfrm_offload *xo = xfrm_offload(skb);
|
||||||
struct sec_path *sp;
|
struct sec_path *sp;
|
||||||
|
|
||||||
if (encap_type < 0) {
|
if (encap_type < 0 || (xo && xo->flags & XFRM_GRO)) {
|
||||||
x = xfrm_input_state(skb);
|
x = xfrm_input_state(skb);
|
||||||
|
|
||||||
if (unlikely(x->km.state != XFRM_STATE_VALID)) {
|
if (unlikely(x->km.state != XFRM_STATE_VALID)) {
|
||||||
|
@ -485,9 +485,7 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
|
||||||
seq = XFRM_SKB_CB(skb)->seq.input.low;
|
seq = XFRM_SKB_CB(skb)->seq.input.low;
|
||||||
goto resume;
|
goto resume;
|
||||||
}
|
}
|
||||||
|
/* GRO call */
|
||||||
/* encap_type < -1 indicates a GRO call. */
|
|
||||||
encap_type = 0;
|
|
||||||
seq = XFRM_SPI_SKB_CB(skb)->seq;
|
seq = XFRM_SPI_SKB_CB(skb)->seq;
|
||||||
|
|
||||||
if (xo && (xo->flags & CRYPTO_DONE)) {
|
if (xo && (xo->flags & CRYPTO_DONE)) {
|
||||||
|
|
Loading…
Reference in a new issue