--- zzzz-none-000/linux-4.1.38/net/ipv6/ah6.c 2017-01-18 18:48:06.000000000 +0000 +++ bcm63-7582-715/linux-4.1.38/net/ipv6/ah6.c 2020-11-25 10:06:48.000000000 +0000 @@ -40,6 +40,10 @@ #include #include +#if defined(CONFIG_BCM_KF_BLOG) && defined(CONFIG_BLOG) +#include +#endif + #define IPV6HDR_BASELEN 8 struct tmp_ext { @@ -350,6 +354,10 @@ int sglists = 0; struct scatterlist *seqhisg; +#if defined(CONFIG_BCM_KF_BLOG) && defined(CONFIG_BLOG) + blog_skip(skb, blog_skip_reason_unknown_proto_ah6); +#endif + ahp = x->data; ahash = ahp->ahash; @@ -435,6 +443,22 @@ AH_SKB_CB(skb)->tmp = iph_base; +#if defined(CONFIG_BCM_KF_SPU) && (defined(CONFIG_BCM_SPU) || defined(CONFIG_BCM_SPU_MODULE)) && !(defined(CONFIG_BCM_RDPA) || defined(CONFIG_BCM_RDPA_MODULE)) + /* ensure there is enough headroom and tailroom for HW info */ + if((skb_headroom(skb) < 12) || + (skb_tailroom(skb) < 20)) + { + req->alloc_buff_spu = 1; + } + else + { + req->alloc_buff_spu = 0; + } + + /* not used for output */ + req->headerLen = 0; +#endif + err = crypto_ahash_digest(req); if (err) { if (err == -EINPROGRESS) @@ -535,6 +559,10 @@ int sglists = 0; struct scatterlist *seqhisg; +#if defined(CONFIG_BCM_KF_BLOG) && defined(CONFIG_BLOG) + blog_skip(skb, blog_skip_reason_unknown_proto_ah6); +#endif + if (!pskb_may_pull(skb, sizeof(struct ip_auth_hdr))) goto out; @@ -614,6 +642,22 @@ AH_SKB_CB(skb)->tmp = work_iph; +#if defined(CONFIG_BCM_KF_SPU) && (defined(CONFIG_BCM_SPU) || defined(CONFIG_BCM_SPU_MODULE)) && !(defined(CONFIG_BCM_RDPA) || defined(CONFIG_BCM_RDPA_MODULE)) + /* ensure there is enough headroom and tailroom for HW info */ + if((skb_headroom(skb) < 12) || + (skb_tailroom(skb) < 20)) + { + req->alloc_buff_spu = 1; + } + else + { + req->alloc_buff_spu = 0; + } + + /* offset to icv */ + req->headerLen = &ah->auth_data[0] - skb->data; +#endif + err = crypto_ahash_digest(req); if (err) { if (err == -EINPROGRESS)