@@ -141,6 +141,7 @@ netdev_nl_napi_fill_one(struct sk_buff *msg, struct napi_struct *napi)
struct netdev_queue *tx_queue, *txq;
unsigned int rx_qid, tx_qid;
struct nlattr *napi_info;
+ pid_t pid;
napi_info = nla_nest_start(msg, NETDEV_A_NAPI_NAPI_INFO);
if (!napi_info)
@@ -165,6 +166,12 @@ netdev_nl_napi_fill_one(struct sk_buff *msg, struct napi_struct *napi)
if (nla_put_u32(msg, NETDEV_A_NAPI_INFO_ENTRY_IRQ, napi->irq))
goto nla_put_failure;
+ if (napi->thread) {
+ pid = task_pid_nr(napi->thread);
+ if (nla_put_s32(msg, NETDEV_A_NAPI_INFO_ENTRY_PID, pid))
+ goto nla_put_failure;
+ }
+
nla_nest_end(msg, napi_info);
return 0;
nla_put_failure:
In the threaded NAPI mode, expose the PID of the NAPI thread. Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> --- net/core/netdev-genl.c | 7 +++++++ 1 file changed, 7 insertions(+)