1. 29 1月, 2008 2 次提交
  2. 11 10月, 2007 2 次提交
    • S
      [NET] netconsole: Support dynamic reconfiguration using configfs · 0bcc1816
      Satyam Sharma 提交于
      Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.
      
      This patch introduces support for dynamic reconfiguration (adding, removing
      and/or modifying parameters of netconsole targets at runtime) using a
      userspace interface exported via configfs.  Documentation is also updated
      accordingly.
      
      Issues and brief design overview:
      
      (1) Kernel-initiated creation / destruction of kernel objects is not
          possible with configfs -- the lifetimes of the "config items" is managed
          exclusively from userspace.  But netconsole must support boot/module
          params too, and these are parsed in kernel and hence netpolls must be
          setup from the kernel.  Joel Becker suggested to separately manage the
          lifetimes of the two kinds of netconsole_target objects -- those created
          via configfs mkdir(2) from userspace and those specified from the
          boot/module option string.  This adds complexity and some redundancy here
          and also means that boot/module param-created targets are not exposed
          through the configfs namespace (and hence cannot be updated / destroyed
          dynamically).  However, this saves us from locking / refcounting
          complexities that would need to be introduced in configfs to support
          kernel-initiated item creation / destroy there.
      
      (2) In configfs, item creation takes place in the call chain of the
          mkdir(2) syscall in the driver subsystem.  If we used an ioctl(2) to
          create / destroy objects from userspace, the special userspace program is
          able to fill out the structure to be passed into the ioctl and hence
          specify attributes such as local interface that are required at the time
          we set up the netpoll.  For configfs, this information is not available at
          the time of mkdir(2).  So, we keep all newly-created targets (via
          configfs) disabled by default.  The user is expected to set various
          attributes appropriately (including the local network interface if
          required) and then write(2) "1" to the "enabled" attribute.  Thus,
          netpoll_setup() is then called on the set parameters in the context of
          _this_ write(2) on the "enabled" attribute itself.  This design enables
          the user to reconfigure existing netconsole targets at runtime to be
          attached to newly-come-up interfaces that may not have existed when
          netconsole was loaded or when the targets were actually created.  All this
          effectively enables us to get rid of custom ioctls.
      
      (3) Ultra-paranoid configfs attribute show() and store() operations, with
          sanity and input range checking, using only safe string primitives, and
          compliant with the recommendations in Documentation/filesystems/sysfs.txt.
      
      (4) A new function netpoll_print_options() is created in the netpoll API,
          that just prints out the configured parameters for a netpoll structure.
          netpoll_parse_options() is modified to use that and it is also exported to
          be used from netconsole.
      Signed-off-by: NSatyam Sharma <satyam@infradead.org>
      Acked-by: NKeiichi Kii <k-keiichi@bx.jp.nec.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0bcc1816
    • S
      [NET]: Make NAPI polling independent of struct net_device objects. · bea3348e
      Stephen Hemminger 提交于
      Several devices have multiple independant RX queues per net
      device, and some have a single interrupt doorbell for several
      queues.
      
      In either case, it's easier to support layouts like that if the
      structure representing the poll is independant from the net
      device itself.
      
      The signature of the ->poll() call back goes from:
      
      	int foo_poll(struct net_device *dev, int *budget)
      
      to
      
      	int foo_poll(struct napi_struct *napi, int budget)
      
      The caller is returned the number of RX packets processed (or
      the number of "NAPI credits" consumed if you want to get
      abstract).  The callee no longer messes around bumping
      dev->quota, *budget, etc. because that is all handled in the
      caller upon return.
      
      The napi_struct is to be embedded in the device driver private data
      structures.
      
      Furthermore, it is the driver's responsibility to disable all NAPI
      instances in it's ->stop() device close handler.  Since the
      napi_struct is privatized into the driver's private data structures,
      only the driver knows how to get at all of the napi_struct instances
      it may have per-device.
      
      With lots of help and suggestions from Rusty Russell, Roland Dreier,
      Michael Chan, Jeff Garzik, and Jamal Hadi Salim.
      
      Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra,
      Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan.
      
      [ Ported to current tree and all drivers converted.  Integrated
        Stephen's follow-on kerneldoc additions, and restored poll_list
        handling to the old style to fix mutual exclusion issues.  -DaveM ]
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bea3348e
  3. 06 12月, 2006 1 次提交
  4. 03 12月, 2006 5 次提交
    • S
      netpoll header cleanup · bf6bce71
      Stephen Hemminger 提交于
      As Steve left netpoll beast, hopefully not to return soon.
      He noticed that the header was messy. He straightened it
      up and polished it a little, then waved goodbye.
      Signed-off-by: NStephen Hemminger <shemminger@osdl.org>
      bf6bce71
    • S
      netpoll queue cleanup · 5de4a473
      Stephen Hemminger 提交于
      The beast had a long and not very happy history. At one
      point, a friend (netdump) had asked that he open up a little.
      Well, the friend was long gone now, and the beast had
      this dangling piece hanging (netpoll_queue).
      
      It wasn't hard to stitch the netpoll_queue back in
      where it belonged and make everything tidy.
      Signed-off-by: NStephen Hemminger <shemminger@osdl.org>
      5de4a473
    • S
      netpoll retry cleanup · 2bdfe0ba
      Stephen Hemminger 提交于
      The netpoll beast was still not happy. If the beast got
      clogged pipes, it tended to stare blankly off in space
      for a long time.
      
      The problem couldn't be completely fixed because the
      beast talked with irq's disabled. But it could be made
      less painful and shorter.
      Signed-off-by: NStephen Hemminger <shemminger@osdl.org>
      2bdfe0ba
    • S
      netpoll per device txq · b6cd27ed
      Stephen Hemminger 提交于
      When the netpoll beast got really busy, it tended to clog
      things, so it stored them for later. But the beast was putting
      all it's skb's in one basket. This was bad because maybe some
      pipes were clogged and others were not.
      Signed-off-by: NStephen Hemminger <shemminger@osdl.org>
      b6cd27ed
    • S
      netpoll info leak · 93ec2c72
      Stephen Hemminger 提交于
      After looking harder, Steve noticed that the netpoll
      beast leaked a little every time it shutdown for a nap.
      Not a big leak, but a nuisance kind of thing.
      
      He took out his refcount duct tape and patched the
      leak. It was overkill since there was already other
      locking in that area, but it looked clean and wouldn't
      attract fleas.
      Signed-off-by: NStephen Hemminger <shemminger@osdl.org>
      93ec2c72
  5. 26 6月, 2006 1 次提交
  6. 13 10月, 2005 1 次提交
  7. 12 8月, 2005 2 次提交
  8. 23 6月, 2005 3 次提交
    • J
      [NETPOLL]: allow multiple netpoll_clients to register against one interface · fbeec2e1
      Jeff Moyer 提交于
      This patch provides support for registering multiple netpoll clients to the
      same network device.  Only one of these clients may register an rx_hook,
      however.  In practice, this restriction has not been problematic.  It is
      worth mentioning, though, that the current design can be easily extended to
      allow for the registration of multiple rx_hooks.
      
      The basic idea of the patch is that the rx_np pointer in the netpoll_info
      structure points to the struct netpoll that has rx_hook filled in.  Aside
      from this one case, there is no need for a pointer from the struct
      net_device to an individual struct netpoll.
      
      A lock is introduced to protect the setting and clearing of the np_rx
      pointer.  The pointer will only be cleared upon netpoll client module
      removal, and the lock should be uncontested.
      Signed-off-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fbeec2e1
    • J
      [NETPOLL]: Introduce a netpoll_info struct · 115c1d6e
      Jeff Moyer 提交于
      This patch introduces a netpoll_info structure, which the struct net_device
      will now point to instead of pointing to a struct netpoll.  The reason for
      this is two-fold: 1) fields such as the rx_flags, poll_owner, and poll_lock
      should be maintained per net_device, not per netpoll;  and 2) this is a first
      step in providing support for multiple netpoll clients to register against the
      same net_device.
      
      The struct netpoll is now pointed to by the netpoll_info structure.  As
      such, the previous behaviour of the code is preserved.
      Signed-off-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      115c1d6e
    • J
      [NETPOLL]: Set poll_owner to -1 before unlocking in netpoll_poll_unlock() · 6ca4f65e
      Jeff Moyer 提交于
      This trivial patch moves the assignment of poll_owner to -1 inside of
      the lock.  This fixes a potential SMP race in the code.
      Signed-off-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6ca4f65e
  9. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4