Re: [GENETLINK]: Question: global lock (genl_mutex) possible refinement?

2007-08-17 Thread Richard MUSIL
Thomas Graf wrote: @@ -150,9 +176,9 @@ int genl_register_ops(struct genl_family *family, struct genl_ops *ops) if (ops-policy) ops-flags |= GENL_CMD_CAP_HASPOL; -genl_lock(); +genl_fam_lock(family); list_add_tail(ops-ops_list, family-ops_list); -

Re: [GENETLINK] some thoughts on the usage

2007-08-16 Thread Richard MUSIL
Thomas Graf wrote: * Richard MUSIL [EMAIL PROTECTED] 2007-08-10 10:45 I have noticed that although ops for each family are the same (each device is functionally same) I cannot use same genl_ops struct for registration, because it uses internal member to link in list. Therefore it is necessary

Re: [GENETLINK]: Question: global lock (genl_mutex) possible refinement?

2007-08-10 Thread Richard MUSIL
Hello Thomas, I wonder, if you had time to take a look at the patch I posted back then. Richard Thomas Graf wrote: Please provide a new overall patch which is not based on your initial patch so I can review your idea properly. Here it goes (merging two previous patches). I have

[GENETLINK] some thoughts on the usage

2007-08-10 Thread Richard MUSIL
Hello all, I am currently writing virtual TPM device driver. This is supposed to behave the same way as normal TPM but instead sending commands to hardware device, it will pass them back to user space. Probably similar in concept to tun/tap but with the difference it has nothing to do with

Re: [GENETLINK]: Question: global lock (genl_mutex) possible refinement?

2007-07-24 Thread Richard MUSIL
Thomas Graf wrote: Please provide a new overall patch which is not based on your initial patch so I can review your idea properly. Here it goes (merging two previous patches). I have diffed against v2.6.22, which I am using currently as my base: include/net/genetlink.h |1 +

Re: [GENETLINK]: Question: global lock (genl_mutex) possible refinement?

2007-07-23 Thread Richard MUSIL
From 63b3ee722402533aed6e137347e41ab1a1fa1127 Mon Sep 17 00:00:00 2001 From: Richard Musil [EMAIL PROTECTED] Date: Mon, 23 Jul 2007 15:12:09 +0200 Subject: [PATCH] Added private mutex for each genetlink family (struct genl_family). This mutex is used to synchronize access to particular family

[GENETLINK]: Question: global lock (genl_mutex) possible refinement?

2007-07-20 Thread Richard MUSIL
I am currently trying to write a module which communicates with user space using NETLINK_GENERIC. This module (dev_mgr) manages virtual devices which are also supposed to use genetlink for communication with user space. I want to do something like that: dev_mgr - receives message from user

Re: [GENETLINK]: Question: global lock (genl_mutex) possible refinement?

2007-07-20 Thread Richard MUSIL
Patrick McHardy wrote: Richard MUSIL wrote: I am currently trying to write a module which communicates with user space using NETLINK_GENERIC. This module (dev_mgr) manages virtual devices which are also supposed to use genetlink for communication with user space. I want to do something like

Re: [GENETLINK]: Question: global lock (genl_mutex) possible refinement?

2007-07-20 Thread Richard MUSIL
genetlink module, I hope authors of genetlink will comment on that. Currently, I do not see any reason for that, but this could be due to my limited knowledge. -- Richard From a02ef65329fa33591247f9f3a39f2917afe1ce89 Mon Sep 17 00:00:00 2001 From: Richard Musil [EMAIL PROTECTED] Date: Fri, 20 Jul 2007