net: qrtr: Add local enqueue ipc logging
If client and service both are at HLOS, from qrtr side we don't have any logging mechanism to log the transaction. So its hard to debug issues such as request timeout issue, service errors, indication errors. To avoid this added local logging in qrtr layer to make sure that request reached to qrtr and forwared to service and vice-versa. Change-Id: Ie64aec8e6594e01e4a36094dc9c35140012ce65b Signed-off-by: Kishore Kumar Ravi <quic_kiskum@quicinc.com>
This commit is contained in:
parent
8c3c240e0f
commit
171a5818f1
@ -123,6 +123,9 @@ static inline struct qrtr_sock *qrtr_sk(struct sock *sk)
|
||||
static unsigned int qrtr_local_nid = CONFIG_QRTR_NODE_ID;
|
||||
static unsigned int qrtr_wakeup_ms = CONFIG_QRTR_WAKEUP_MS;
|
||||
|
||||
/* For local IPC logging context*/
|
||||
static void *qrtr_local_ilc;
|
||||
|
||||
/* for node ids */
|
||||
static RADIX_TREE(qrtr_nodes, GFP_ATOMIC);
|
||||
static DEFINE_SPINLOCK(qrtr_nodes_lock);
|
||||
@ -1632,6 +1635,12 @@ static int qrtr_local_enqueue(struct qrtr_node *node, struct sk_buff *skb,
|
||||
cb->src_node = from->sq_node;
|
||||
cb->src_port = from->sq_port;
|
||||
|
||||
QRTR_INFO(qrtr_local_ilc,
|
||||
"LOCAL ENQUEUE: cmd:0x%x src[0x%x:0x%x] dst[0x%x:0x%x] [%s] pid:%d\n",
|
||||
type, from->sq_node, from->sq_port,
|
||||
to->sq_node, to->sq_port, current->comm,
|
||||
current->pid);
|
||||
|
||||
if (sock_queue_rcv_skb(&ipc->sk, skb)) {
|
||||
qrtr_port_put(ipc);
|
||||
kfree_skb(skb);
|
||||
@ -2102,6 +2111,9 @@ static int __init qrtr_proto_init(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
qrtr_local_ilc = ipc_log_context_create(QRTR_LOG_PAGE_CNT,
|
||||
"qrtr_local", 0);
|
||||
|
||||
rc = proto_register(&qrtr_proto, 1);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user