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
Branches
Tags
No related merge requests found
...@@ -787,25 +787,40 @@ static unsigned int ppa_postrt_hook_fn(void *priv, ...@@ -787,25 +787,40 @@ static unsigned int ppa_postrt_hook_fn(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state) 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); struct iphdr *hdr = ip_hdr(skb);
if (hdr->protocol != IPPROTO_ESP) { /* exclude the encrypted ipsec tunnel packets */ /* exclude the encrypted ipsec tunnel packets */
#endif if (hdr->protocol != IPPROTO_ESP) {
if (ppa_hook_session_add_fn != NULL) { #endif /* CONFIG_PPA_MPE_IP97*/
struct nf_conn *ct = NULL; if (!ppa_hook_session_add_fn)
enum ip_conntrack_info ctinfo; return NF_ACCEPT;
uint32_t flags;
#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 */ ct = nf_ct_get(skb, &ctinfo);
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); flags = 0; /* post routing */
} flags |= CTINFO2DIR(ctinfo) == IP_CT_DIR_ORIGINAL ?
#if defined(CONFIG_PPA_MPE_IP97) 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; return NF_ACCEPT;
} }
......
...@@ -102,6 +102,14 @@ config INTEL_IPQOS_MARK_SKBPRIO ...@@ -102,6 +102,14 @@ config INTEL_IPQOS_MARK_SKBPRIO
If unsure, say N. 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 if INET
source "net/ipv4/Kconfig" source "net/ipv4/Kconfig"
source "net/ipv6/Kconfig" source "net/ipv6/Kconfig"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment