mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrei Warkentin <awarkentin@vmware.com>
To: Jason Wessel <jason.wessel@windriver.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andrei Warkentin <andreiw@vmware.com>,
	kgdb-bugreport@lists.sourceforge.net,
	Matt Mackall <mpm@selenic.com>,
	Andrei Warkentin <andrey.warkentin@gmail.com>
Subject: Re: [PATCHv3 1/3] NETPOLL: Extend rx_hook support.
Date: Mon, 27 Feb 2012 15:33:55 -0800 (PST)	[thread overview]
Message-ID: <628860779.1621452.1330385635262.JavaMail.root@zimbra-prod-mbox-2.vmware.com> (raw)
In-Reply-To: <4F4C0EF8.8010405@windriver.com>

Hi,

Thank you for the review, Jason. Comments inline.

----- Original Message -----
> From: "Jason Wessel" <jason.wessel@windriver.com>
> To: "Andrei Warkentin" <andrey.warkentin@gmail.com>
> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Andrei Warkentin" <andreiw@vmware.com>,
> kgdb-bugreport@lists.sourceforge.net, "Matt Mackall" <mpm@selenic.com>
> Sent: Monday, February 27, 2012 6:17:12 PM
> Subject: Re: [PATCHv3 1/3] NETPOLL: Extend rx_hook support.
> 
> 
> I am just now starting to look how this patch set compares to kgdboe.
>  For the kgdboe the patch is a bit different.  The kgdboe opted to
> just pass the skb so as to cut down on the number of arguments to
> the function call.
> 
> From the kgdboe patch:
> 
> -       void (*rx_hook)(struct netpoll *, int, char *, int);
> +       void (*rx_hook)(struct netpoll *, int, char *, int, struct
> sk_buff *);
> 
> 

Interesting, I thought about passing the skb, but decided I didn't
want to copy and paste the skb parsing code, especially given
that it's always UDP anyway. I still have reservations about
passing the physical address, but I don't think anyone tried
to use netpoll or a non-ethernet device anyway.

> >  
> > +void netpoll_poll_dev(struct net_device *dev);
> >  void netpoll_send_udp(struct netpoll *np, const char *msg, int
> >  
> > -static void netpoll_poll_dev(struct net_device *dev)
> > +void netpoll_poll_dev(struct net_device *dev)
> 
> 
> This is interesting and I will have to look into this further...  A
> large part of the reason kgdboe never went anywhere was all around
> the locking problems the ability to safely use the network hardware
> and restore the state when it was done.  It appears you made this
> change so as to make a lockless call directly instead of going
> through netpoll_poll().  I am not entirely sure you could safely do
> this.
> 
> In kgdboe we always had:
> 
> +static int eth_get_char(void)
> +{
> +	int chr;
> +
> +	while (atomic_read(&in_count) == 0)
> +		netpoll_poll(&np);
> 
> 
> If it is the case that you really can safely call the
> netpoll_poll_dev() without the locks then the horrible sync irq
> state etc... could go away in kgdboe, and then it would be worth
> considering digging up all the ethernet polling errata fixes that
> live of out the mainline and perhaps submit some for review.
> 

I didn't look deeply at kgdboe (probably should have...). Anyway, netpoll_poll
doesn't seem to exist. netpoll_poll_dev is called from netpoll_send_skb_on_dev
and the only contract I see is running with the interrupts disabled - something
that is satisfied by running in the context of KDB.

This is slight OT, but...are WiFi drivers sufficiently similar that netpoll "just works?"

Thanks again.

A

  reply	other threads:[~2012-02-27 23:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1330137851-4716-1-git-send-email-andrey.warkentin@gmail.com>
2012-02-27  2:05 ` NetKGDB support v2 Andrei Warkentin
2012-02-27  2:05   ` [PATCHv2 1/2] NETPOLL: Extend rx_hook support Andrei Warkentin
2012-02-27  2:05   ` [PATCHv2 2/2] NETKGDB: Ethernet/UDP/IP KDB transport Andrei Warkentin
2012-02-27  3:30 ` NetKGDB v3 Andrei Warkentin
2012-02-27  3:30   ` [PATCHv3 1/3] NETPOLL: Extend rx_hook support Andrei Warkentin
2012-02-27 23:17     ` Jason Wessel
2012-02-27 23:33       ` Andrei Warkentin [this message]
2012-02-28 16:06         ` Jason Wessel
2012-02-28 17:43           ` Andrei Warkentin
2012-03-01 21:04             ` Andrei Warkentin
2012-03-01 22:24               ` Jason Wessel
2012-03-01 23:41                 ` Andrei Warkentin
2012-02-27  3:30   ` [PATCHv3 2/3] NETKGDB: Ethernet/UDP/IP KDB transport Andrei Warkentin
2012-02-27  5:29     ` Valdis.Kletnieks
2012-02-27  5:36       ` Andrei Warkentin
2012-02-27  3:30   ` [PATCHv3 3/3] KGDB: Allow registering multiple I/O ops Andrei Warkentin
2012-02-27  4:38   ` NetKGDB v3 David Miller
2012-02-27  4:43     ` Andrei E. Warkentin
2012-02-28  0:04   ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=628860779.1621452.1330385635262.JavaMail.root@zimbra-prod-mbox-2.vmware.com \
    --to=awarkentin@vmware.com \
    --cc=andreiw@vmware.com \
    --cc=andrey.warkentin@gmail.com \
    --cc=jason.wessel@windriver.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®