Loading drivers/platform/msm/ipa/ipa_v3/ethernet/ipa_eth_ep.c +34 −11 Original line number Diff line number Diff line Loading @@ -15,26 +15,49 @@ #include "ipa_eth_i.h" #include "ipa_eth_trace.h" #ifndef IPA_ETH_EP_LOOPBACK static int __handle_ipa_receive(struct ipa_eth_channel *ch, struct sk_buff *skb) { if (!ch->process_skb) { dev_kfree_skb_any(skb); return NET_RX_DROP; } return ch->process_skb(ch, skb); } #else static int __handle_ipa_receive(struct ipa_eth_channel *ch, struct sk_buff *skb) { if (ipa_tx_dp(IPA_CLIENT_AQC_ETHERNET_CONS, skb, NULL)) { dev_kfree_skb_any(skb); return NET_RX_DROP; } ch->exception_loopback++; return NET_RX_SUCCESS; } #endif static void handle_ipa_receive(struct ipa_eth_channel *ch, unsigned long data) { bool success = false; bool tracing = trace_lan_rx_skb_enabled(); struct sk_buff *skb = (struct sk_buff *) data; trace_lan_rx_skb(ch, skb); ch->exception_total++; #ifndef IPA_ETH_EP_LOOPBACK success = ch->process_skb && !ch->process_skb(ch, skb); #else success = !ipa_tx_dp(IPA_CLIENT_AQC_ETHERNET_CONS, skb, NULL); if (success) ch->exception_loopback++; #endif /* Keep skb from being freed until tracing is completed */ if (tracing) skb_get(skb); if (!success) { if (__handle_ipa_receive(ch, skb) == NET_RX_DROP) ch->exception_drops++; if (tracing) { trace_lan_rx_skb(ch, skb); dev_kfree_skb_any(skb); } } Loading drivers/platform/msm/ipa/ipa_v3/ethernet/ipa_eth_trace.h +10 −7 Original line number Diff line number Diff line Loading @@ -31,23 +31,26 @@ TRACE_EVENT(lan_rx_skb, TP_ARGS(ch, skb), TP_STRUCT__entry( __field(const char *, dev) __field(int, queue) __field(int, ep_num) __field(const struct ethhdr *, eth_hdr) __field(unsigned int, eth_proto) __field(unsigned int, skb_len) __field(u64, count_total) __field(u64, count_drops) __field(u64, count_loopback) ), TP_fast_assign( __entry->dev = ch->eth_dev->net_dev->name; __entry->queue = ch->queue; __entry->ep_num = ch->ipa_ep_num; __entry->eth_hdr = (struct ethhdr *)skb->data; __entry->eth_proto = ntohs(__entry->eth_hdr->h_proto); __entry->skb_len = skb->len; __entry->count_total = ch->exception_total; __entry->count_drops = ch->exception_drops; __entry->count_loopback = ch->exception_loopback; ), TP_printk("dev=%s queue=%d ep_num=%d eth_proto=%04X skb_len=%u", __entry->dev, __entry->queue, __entry->ep_num, __entry->eth_proto, __entry->skb_len TP_printk( "dev=%s count_total=%llu count_drops=%llu count_loopback=%llu eth_proto=%04X skb_len=%u", __entry->dev, __entry->count_total, __entry->count_drops, __entry->count_loopback, __entry->eth_proto, __entry->skb_len ) ); Loading Loading
drivers/platform/msm/ipa/ipa_v3/ethernet/ipa_eth_ep.c +34 −11 Original line number Diff line number Diff line Loading @@ -15,26 +15,49 @@ #include "ipa_eth_i.h" #include "ipa_eth_trace.h" #ifndef IPA_ETH_EP_LOOPBACK static int __handle_ipa_receive(struct ipa_eth_channel *ch, struct sk_buff *skb) { if (!ch->process_skb) { dev_kfree_skb_any(skb); return NET_RX_DROP; } return ch->process_skb(ch, skb); } #else static int __handle_ipa_receive(struct ipa_eth_channel *ch, struct sk_buff *skb) { if (ipa_tx_dp(IPA_CLIENT_AQC_ETHERNET_CONS, skb, NULL)) { dev_kfree_skb_any(skb); return NET_RX_DROP; } ch->exception_loopback++; return NET_RX_SUCCESS; } #endif static void handle_ipa_receive(struct ipa_eth_channel *ch, unsigned long data) { bool success = false; bool tracing = trace_lan_rx_skb_enabled(); struct sk_buff *skb = (struct sk_buff *) data; trace_lan_rx_skb(ch, skb); ch->exception_total++; #ifndef IPA_ETH_EP_LOOPBACK success = ch->process_skb && !ch->process_skb(ch, skb); #else success = !ipa_tx_dp(IPA_CLIENT_AQC_ETHERNET_CONS, skb, NULL); if (success) ch->exception_loopback++; #endif /* Keep skb from being freed until tracing is completed */ if (tracing) skb_get(skb); if (!success) { if (__handle_ipa_receive(ch, skb) == NET_RX_DROP) ch->exception_drops++; if (tracing) { trace_lan_rx_skb(ch, skb); dev_kfree_skb_any(skb); } } Loading
drivers/platform/msm/ipa/ipa_v3/ethernet/ipa_eth_trace.h +10 −7 Original line number Diff line number Diff line Loading @@ -31,23 +31,26 @@ TRACE_EVENT(lan_rx_skb, TP_ARGS(ch, skb), TP_STRUCT__entry( __field(const char *, dev) __field(int, queue) __field(int, ep_num) __field(const struct ethhdr *, eth_hdr) __field(unsigned int, eth_proto) __field(unsigned int, skb_len) __field(u64, count_total) __field(u64, count_drops) __field(u64, count_loopback) ), TP_fast_assign( __entry->dev = ch->eth_dev->net_dev->name; __entry->queue = ch->queue; __entry->ep_num = ch->ipa_ep_num; __entry->eth_hdr = (struct ethhdr *)skb->data; __entry->eth_proto = ntohs(__entry->eth_hdr->h_proto); __entry->skb_len = skb->len; __entry->count_total = ch->exception_total; __entry->count_drops = ch->exception_drops; __entry->count_loopback = ch->exception_loopback; ), TP_printk("dev=%s queue=%d ep_num=%d eth_proto=%04X skb_len=%u", __entry->dev, __entry->queue, __entry->ep_num, __entry->eth_proto, __entry->skb_len TP_printk( "dev=%s count_total=%llu count_drops=%llu count_loopback=%llu eth_proto=%04X skb_len=%u", __entry->dev, __entry->count_total, __entry->count_drops, __entry->count_loopback, __entry->eth_proto, __entry->skb_len ) ); Loading