Hi Bob,

> I think that's the normal case to reuse that page after its context have been
> transmitted.
> I'm looking at the block driver since it's a iSCSI block device , the 
> sequence is
> like this:
> 1. A user call get_page() and then call submit_bio() 2. Then the page data is
> going to be transmitted through iSCSI and ixgbe. Fix me if I was wrong, I'm
> not clear how ixgbe was involved.
> 3. When the bio is completed, bio-> bi_end_io() function will be triggered
> and call put_page().
I'm not sure about your implementation but there are plenty of other iSCSI 
components (targets and initiators) that work with our drivers today.  So what 
you are doing in the application is doing something different.  You may want to 
look for some of these other iSCSI components and look to see what they are 
doing regarding transmits.  As I've said there is no way for the driver to 
indicate back up the stack to indicate that a transmit of any given packet has 
happened.  Also, If you think about it how would the driver know that a packet 
is part of a certain page (or iSCSI frame) to indicate that information back up 
the stack?  The base drivers have no mechanisms to do this.  Since other iSCSI 
agents are implemented and running in the kernel without such a feature are all 
working this seems to be something in your implementation.

Please look around at other Linux iSCSI code to see what they are doing.

Thanks.

Cheers,
John

> -----Original Message-----
> From: Bob Liu [mailto:lliu...@gmail.com]
> Sent: Tuesday, March 10, 2015 7:26 AM
> To: Ronciak, John
> Cc: Kirsher, Jeffrey T; e1000-devel; Tantilov, Emil S
> Subject: Re: [E1000-devel] ixgbe: kernel BUG at include/linux/mm.h
> 
> On Tue, Mar 10, 2015 at 9:58 PM, Ronciak, John <john.ronc...@intel.com>
> wrote:
> >> -----Original Message-----
> >> From: Jeff Kirsher [mailto:jeffrey.t.kirs...@intel.com]
> >> Sent: Tuesday, March 10, 2015 6:38 AM
> >> To: Bob Liu
> >> Cc: e1000-devel; Tantilov, Emil S
> >> Subject: Re: [E1000-devel] ixgbe: kernel BUG at include/linux/mm.h
> >>
> >> On Tue, 2015-03-10 at 21:29 +0800, Bob Liu wrote:
> >> > > Would you mind sending your actual test cases to prove that the
> >> > > page is free when calling _skb_frag_unref
> >> >
> >> > I'm afraid not, it's a complex testing program and difficult to run
> >> > on external environment because of many dependencies.
> >> >
> >> > > from the ixgbe code. This seems like a viable area this would be
> >> > going
> >> > > wrong and we need synchronization for packets calling
> >> > > dev_kfree_skb_any in ixgbe_clean_tx_irq if this
> >> > is
> >> > > happening.
> >> >
> >> > Since it's a iSCSI device, I'd like to know whether ixgbe driver
> >> > will notifiy the upper layer "transmit package complete" before
> >> > dev_kfree_skb_any()?
> >> >
> >> > The situation I'm worry about is like this:
> >> >
> >> > block driver:                               net driver:
> >> > submit_bio()
> >> >
> >> > ixgbe_xmit_frame_ring()
> >> >                                                 notify block driver
> >> > tx done
> >> >
> >> > bio_done()
> >> > {
> >> >     free_page()
> >> > }
> >> >
> >> >                                                  dev_kfree_skb_any()
> >> >                                                  ^^^ Here the page
> >> > already freed by block driver.
> >>
> >> Bob-
> >> I am sorry you had to deal with Nick.  He is not an Intel developer,
> >> even though he talks as if he was.  He has now been banned from our
> >> mailing list (this has been coming for some time now).
> >>
> >> In a few hours, most of the ixgbe developers will be in the office
> >> and can assist you with your questions/inquiries.
> >>
> >> Cheers,
> >> Jeff
> > Hi Bob,
> >
> 
> Thanks for your reply, John.
> 
> > There is really no way for a base Ethernet driver to do this.  There is no
> kernel interface for it.  It's the drivers responsibility to free the skb and 
> any
> associated buffers on transmit.  So I have to ask, why are you freeing a 
> buffer
> (page) that you have sent off to be transmitted?
> >
> 
> I think that's the normal case to reuse that page after its context have been
> transmitted.
> I'm looking at the block driver since it's a iSCSI block device , the 
> sequence is
> like this:
> 1. A user call get_page() and then call submit_bio() 2. Then the page data is
> going to be transmitted through iSCSI and ixgbe. Fix me if I was wrong, I'm
> not clear how ixgbe was involved.
> 3. When the bio is completed, bio-> bi_end_io() function will be triggered
> and call put_page().
> 
> --
> Regards,
> --Bob
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to