From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Subject: Re: modifications for SMP processor Date: Wed, 04 Aug 2004 13:11:39 +0200 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <4110C46B.6000100@eurodev.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: To: laurent Schweizer , Netfilter Development Mailinglist In-Reply-To: Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org Hi Laurent, laurent Schweizer wrote: >I am writing a target for iptables. > >My target has a table and I see that it is not working correctly on SMP >processor. > > well, that's not enough info. Anyway, if all iptables rules are sharing that table (I mean that table is defined inside the target as a global var), I guess that you need reader/writer lock. On the other hand, if the table is inside the target's private information, that's different... you should have a look at ipt_limit.c for a reference. >I want to know which modifications I must make, or where I can find an >example. > > Robert Love has written a good article about this: http://www.linuxjournal.com/article.php?sid=5833 Check out also Rusty's unreliable guide for locking in the kernel. regards, Pablo