diff options
| author | yangwei <[email protected]> | 2024-04-01 18:59:08 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-04-01 19:26:46 +0800 |
| commit | 1cedda106847083365751cb46f108fc3e539bb4c (patch) | |
| tree | f8a1f8497696d2e24c4c979b28d1d79e8a746408 | |
| parent | a39e2ffe728c2bc6629139b0fea25403f313e758 (diff) | |
🎈 perf(get_current_rawpkt_from_streaminfo): inline & likelyv4.3.42
| -rw-r--r-- | src/dealpkt/deal_ipv6.c | 2 | ||||
| -rw-r--r-- | src/dealpkt/plug_support.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/dealpkt/deal_ipv6.c b/src/dealpkt/deal_ipv6.c index d3369ff..42f6d7e 100644 --- a/src/dealpkt/deal_ipv6.c +++ b/src/dealpkt/deal_ipv6.c @@ -169,9 +169,9 @@ static inline int checkipv6pkt(const struct mesa_ip6_hdr * iph, int payload_len, }
switch(iph->ip6_nxt_hdr){
+#if 0
case NEXTHDR_TCP :
case NEXTHDR_UDP :
-#if 0
case NEXTHDR_IPV6 :
case NEXTHDR_HOP :
case NEXTHDR_IPIP :
diff --git a/src/dealpkt/plug_support.c b/src/dealpkt/plug_support.c index f744f66..334e4ec 100644 --- a/src/dealpkt/plug_support.c +++ b/src/dealpkt/plug_support.c @@ -395,10 +395,10 @@ static int get_vxlan_info_from_streaminfo(const struct streaminfo_private *pstre return ret;
}
-const void *get_current_rawpkt_from_streaminfo(const struct streaminfo *pstream)
+inline const void *get_current_rawpkt_from_streaminfo(const struct streaminfo *pstream)
{
const struct streaminfo_private *pstream_pr = (const struct streaminfo_private *)pstream;
- if(pstream_pr->plugin_process_context != 0)
+ if(likely(pstream_pr->plugin_process_context != 0))
{
return pstream_pr->raw_pkt;
}
|
