Skip to content
Snippets Groups Projects
Commit 37c86b73 authored by Rastogi, Deepansh's avatar Rastogi, Deepansh Committed by Kenneth Johansson
Browse files

Merge pull request #246 in SW_PON/linux from...

Merge pull request #246 in SW_PON/linux from feature/UGW_SW-20799-session-based-accel-disable-porting to xrx500

* commit '219936d5dd9f28a75a3c2a621aabeea446226d87':
  UGW_SW-20799: Session Based Acceleration Disable
parent 10283abc
No related branches found
No related tags found
No related merge requests found
......@@ -787,25 +787,40 @@ static unsigned int ppa_postrt_hook_fn(void *priv,
struct sk_buff *skb,
const struct nf_hook_state *state)
{
#if defined(CONFIG_PPA_MPE_IP97)
#if IS_ENABLED(CONFIG_PPA_MPE_IP97)
struct iphdr *hdr = ip_hdr(skb);
if (hdr->protocol != IPPROTO_ESP) { /* exclude the encrypted ipsec tunnel packets */
#endif
if (ppa_hook_session_add_fn != NULL) {
struct nf_conn *ct = NULL;
enum ip_conntrack_info ctinfo;
uint32_t flags;
/* exclude the encrypted ipsec tunnel packets */
if (hdr->protocol != IPPROTO_ESP) {
#endif /* CONFIG_PPA_MPE_IP97*/
if (!ppa_hook_session_add_fn)
return NF_ACCEPT;
#if IS_ENABLED(CONFIG_INTEL_IPQOS_ACCEL_DISABLE)
/* check for 13th bit in NFMARK set by IPQOS classifier */
/* If this bit is set, dont call PPA session add fn*/
bool accel_st = 0;
#if IS_ENABLED(CONFIG_NETWORK_EXTMARK)
GET_DATA_FROM_MARK_OPT(skb->extmark, ACCELSEL_MASK,
ACCELSEL_START_BIT_POS, accel_st);
#endif /* CONFIG_NETWORK_EXTMARK*/
if (accel_st != 0)
return NF_ACCEPT;
#endif /* CONFIG_INTEL_IPQOS_ACCEL_DISABLE*/
ct = nf_ct_get(skb, &ctinfo);
struct nf_conn *ct = NULL;
enum ip_conntrack_info ctinfo;
uint32_t flags;
flags = 0; /* post routing */
flags |= CTINFO2DIR(ctinfo) == IP_CT_DIR_ORIGINAL ? PPA_F_SESSION_ORG_DIR : PPA_F_SESSION_REPLY_DIR;
ct = nf_ct_get(skb, &ctinfo);
ppa_hook_session_add_fn(skb, ct, flags);
}
#if defined(CONFIG_PPA_MPE_IP97)
flags = 0; /* post routing */
flags |= CTINFO2DIR(ctinfo) == IP_CT_DIR_ORIGINAL ?
PPA_F_SESSION_ORG_DIR : PPA_F_SESSION_REPLY_DIR;
ppa_hook_session_add_fn(skb, ct, flags);
#if IS_ENABLED(CONFIG_PPA_MPE_IP97)
}
#endif
#endif /* CONFIG_PPA_MPE_IP97*/
return NF_ACCEPT;
}
......
......@@ -102,6 +102,14 @@ config INTEL_IPQOS_MARK_SKBPRIO
If unsure, say N.
config INTEL_IPQOS_ACCEL_DISABLE
bool "IPQOS Accelration Disable Support"
depends on INTEL_IPQOS
help
Enable/Disable 'PPA session learning' using bit 13 in EXTMARK
If unsure say N
if INET
source "net/ipv4/Kconfig"
source "net/ipv6/Kconfig"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment