All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] cxgb4: driver submission V3
@ 2010-02-26 23:35 Dimitris Michailidis
  2010-02-26 23:35 ` [PATCH 1/7] cxgb4: Add register and message definitions Dimitris Michailidis
  0 siblings, 1 reply; 18+ messages in thread
From: Dimitris Michailidis @ 2010-02-26 23:35 UTC (permalink / raw)
  To: netdev


This is V3 of the cxgb4 patches, which is V2 with reworked macro names.

 drivers/net/Kconfig            |   25 +
 drivers/net/Makefile           |    1 +
 drivers/net/cxgb4/Makefile     |    7 +
 drivers/net/cxgb4/cxgb4.h      |  735 +++++++
 drivers/net/cxgb4/cxgb4_main.c | 4234 ++++++++++++++++++++++++++++++++++++++++
 drivers/net/cxgb4/cxgb4_uld.h  |  230 +++
 drivers/net/cxgb4/l2t.c        |  626 ++++++
 drivers/net/cxgb4/l2t.h        |  110 ++
 drivers/net/cxgb4/sge.c        | 2461 +++++++++++++++++++++++
 drivers/net/cxgb4/t4_hw.c      | 3119 +++++++++++++++++++++++++++++
 drivers/net/cxgb4/t4_hw.h      |  100 +
 drivers/net/cxgb4/t4_msg.h     |  649 ++++++
 drivers/net/cxgb4/t4_regs.h    |  873 +++++++++
 drivers/net/cxgb4/t4fw_api.h   | 1535 +++++++++++++++
 14 files changed, 14705 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/cxgb4/Makefile
 create mode 100644 drivers/net/cxgb4/cxgb4.h
 create mode 100644 drivers/net/cxgb4/cxgb4_main.c
 create mode 100644 drivers/net/cxgb4/cxgb4_uld.h
 create mode 100644 drivers/net/cxgb4/l2t.c
 create mode 100644 drivers/net/cxgb4/l2t.h
 create mode 100644 drivers/net/cxgb4/sge.c
 create mode 100644 drivers/net/cxgb4/t4_hw.c
 create mode 100644 drivers/net/cxgb4/t4_hw.h
 create mode 100644 drivers/net/cxgb4/t4_msg.h
 create mode 100644 drivers/net/cxgb4/t4_regs.h
 create mode 100644 drivers/net/cxgb4/t4fw_api.h

^ permalink raw reply	[flat|nested] 18+ messages in thread
* RE: [PATCH 4/7] cxgb4: Add packet queues and packet DMA code
@ 2010-02-27  0:10 Dimitrios Michailidis
  2010-02-27  0:16 ` Stephen Hemminger
  2010-02-27  9:48 ` David Miller
  0 siblings, 2 replies; 18+ messages in thread
From: Dimitrios Michailidis @ 2010-02-27  0:10 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev



> -----Original Message-----
> From: Stephen Hemminger [mailto:shemminger@vyatta.com]
> Sent: Friday, February 26, 2010 3:58 PM
> To: Dimitrios Michailidis
> Cc: netdev@vger.kernel.org
> Subject: Re: [PATCH 4/7] cxgb4: Add packet queues and packet DMA code
> 
> On Fri, 26 Feb 2010 15:35:36 -0800
> Dimitris Michailidis <dm@chelsio.com> wrote:
> 
> > +
> > +/**
> > + *	need_skb_unmap - does the platform need unmapping of sk_buffs?
> > + *
> > + *	Returns true if the platfrom needs sk_buff unmapping.  The
compiler
> > + *	optimizes away unecessary code if this returns true.
> > + */
> > +static inline int need_skb_unmap(void)
> > +{
> > +	/*
> > +	 * This structure is used to tell if the platfrom needs buffer
> > +	 * unmapping by checking if DECLARE_PCI_UNMAP_ADDR defines
anything.
> > +	 */
> > +	struct dummy {
> > +		DECLARE_PCI_UNMAP_ADDR(addr);
> > +	};
> > +
> > +	return sizeof(struct dummy) != 0;
> > +}
> > +
> 
> I would prefer one code path and let the compiler decide if unmap
> should be nop; rather than this kind of trick code.

I believe this function does not generate any code, the compiler
statically figures out the result and optimizes any conditionals that
call it.  What option do you have in mind that would tell the compiler
if unmap is nop?

^ permalink raw reply	[flat|nested] 18+ messages in thread
* RE: [PATCH 4/7] cxgb4: Add packet queues and packet DMA code
@ 2010-02-27  0:52 Dimitrios Michailidis
  2010-02-27  1:31 ` Stephen Hemminger
  0 siblings, 1 reply; 18+ messages in thread
From: Dimitrios Michailidis @ 2010-02-27  0:52 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev



> -----Original Message-----
> From: netdev-owner@vger.kernel.org
[mailto:netdev-owner@vger.kernel.org]
> On Behalf Of Stephen Hemminger
> Sent: Friday, February 26, 2010 4:16 PM
> To: Dimitrios Michailidis
> Cc: netdev@vger.kernel.org
> Subject: Re: [PATCH 4/7] cxgb4: Add packet queues and packet DMA code
> 
> On Fri, 26 Feb 2010 16:10:07 -0800
> "Dimitrios Michailidis" <dm@chelsio.com> wrote:
> 
> >
> >
> > > -----Original Message-----
> > > From: Stephen Hemminger [mailto:shemminger@vyatta.com]
> > > Sent: Friday, February 26, 2010 3:58 PM
> > > To: Dimitrios Michailidis
> > > Cc: netdev@vger.kernel.org
> > > Subject: Re: [PATCH 4/7] cxgb4: Add packet queues and packet DMA
code
> > >
> > > On Fri, 26 Feb 2010 15:35:36 -0800
> > > Dimitris Michailidis <dm@chelsio.com> wrote:
> > >
> > > > +
> > > > +/**
> > > > + *	need_skb_unmap - does the platform need unmapping of
sk_buffs?
> > > > + *
> > > > + *	Returns true if the platfrom needs sk_buff unmapping.
The
> > compiler
> > > > + *	optimizes away unecessary code if this returns true.
> > > > + */
> > > > +static inline int need_skb_unmap(void)
> > > > +{
> > > > +	/*
> > > > +	 * This structure is used to tell if the platfrom needs
buffer
> > > > +	 * unmapping by checking if DECLARE_PCI_UNMAP_ADDR
defines
> > anything.
> > > > +	 */
> > > > +	struct dummy {
> > > > +		DECLARE_PCI_UNMAP_ADDR(addr);
> > > > +	};
> > > > +
> > > > +	return sizeof(struct dummy) != 0;
> > > > +}
> > > > +
> > >
> > > I would prefer one code path and let the compiler decide if unmap
> > > should be nop; rather than this kind of trick code.
> >
> > I believe this function does not generate any code, the compiler
> > statically figures out the result and optimizes any conditionals
that
> > call it.  What option do you have in mind that would tell the
compiler
> > if unmap is nop?
> 
> Why do you care, let compiler decide.

I want the compiler to decide but I must be missing something.  How is
the compiler going to decide?  The purpose of this code is to tell the
compiler if unmapping is nop.  Does it have another way to tell?

^ permalink raw reply	[flat|nested] 18+ messages in thread
* RE: [PATCH 4/7] cxgb4: Add packet queues and packet DMA code
@ 2010-02-27  1:42 Dimitrios Michailidis
  0 siblings, 0 replies; 18+ messages in thread
From: Dimitrios Michailidis @ 2010-02-27  1:42 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev



> -----Original Message-----
> From: Stephen Hemminger [mailto:shemminger@vyatta.com]
> Sent: Friday, February 26, 2010 5:31 PM
> To: Dimitrios Michailidis
> Cc: netdev@vger.kernel.org
> Subject: Re: [PATCH 4/7] cxgb4: Add packet queues and packet DMA code
> 
> On Fri, 26 Feb 2010 16:52:10 -0800
> "Dimitrios Michailidis" <dm@chelsio.com> wrote:
> 
> >
> >
> > > -----Original Message-----
> > > From: netdev-owner@vger.kernel.org
> > [mailto:netdev-owner@vger.kernel.org]
> > > On Behalf Of Stephen Hemminger
> > > Sent: Friday, February 26, 2010 4:16 PM
> > > To: Dimitrios Michailidis
> > > Cc: netdev@vger.kernel.org
> > > Subject: Re: [PATCH 4/7] cxgb4: Add packet queues and packet DMA
code
> > >
> > > On Fri, 26 Feb 2010 16:10:07 -0800
> > > "Dimitrios Michailidis" <dm@chelsio.com> wrote:
> > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Stephen Hemminger [mailto:shemminger@vyatta.com]
> > > > > Sent: Friday, February 26, 2010 3:58 PM
> > > > > To: Dimitrios Michailidis
> > > > > Cc: netdev@vger.kernel.org
> > > > > Subject: Re: [PATCH 4/7] cxgb4: Add packet queues and packet
DMA
> > code
> > > > >
> > > > > On Fri, 26 Feb 2010 15:35:36 -0800
> > > > > Dimitris Michailidis <dm@chelsio.com> wrote:
> > > > >
> > > > > > +
> > > > > > +/**
> > > > > > + *	need_skb_unmap - does the platform need unmapping of
> > sk_buffs?
> > > > > > + *
> > > > > > + *	Returns true if the platfrom needs sk_buff unmapping.
> > The
> > > > compiler
> > > > > > + *	optimizes away unecessary code if this returns true.
> > > > > > + */
> > > > > > +static inline int need_skb_unmap(void)
> > > > > > +{
> > > > > > +	/*
> > > > > > +	 * This structure is used to tell if the platfrom needs
> > buffer
> > > > > > +	 * unmapping by checking if DECLARE_PCI_UNMAP_ADDR
> > defines
> > > > anything.
> > > > > > +	 */
> > > > > > +	struct dummy {
> > > > > > +		DECLARE_PCI_UNMAP_ADDR(addr);
> > > > > > +	};
> > > > > > +
> > > > > > +	return sizeof(struct dummy) != 0;
> > > > > > +}
> > > > > > +
> > > > >
> > > > > I would prefer one code path and let the compiler decide if
unmap
> > > > > should be nop; rather than this kind of trick code.
> > > >
> > > > I believe this function does not generate any code, the compiler
> > > > statically figures out the result and optimizes any conditionals
> > that
> > > > call it.  What option do you have in mind that would tell the
> > compiler
> > > > if unmap is nop?
> > >
> > > Why do you care, let compiler decide.
> >
> > I want the compiler to decide but I must be missing something.  How
is
> > the compiler going to decide?  The purpose of this code is to tell
the
> > compiler if unmapping is nop.  Does it have another way to tell?
> 
> I looked closer, it is all tied up with deferred skb unmapping and
that
> code looks inherited from cxgb3. Not sure why you need to hold to skb
for
> so long: some offload requirement? Anyway keep it they way it is..

Yes, offload packets can have their payload DMAd after their DMA
descriptor is freed and so they need to remain mapped longer.

^ permalink raw reply	[flat|nested] 18+ messages in thread
* [PATCH 0/7] cxgb4: driver submission V4
@ 2010-02-28 16:09 Dimitris Michailidis
  2010-02-28 16:09 ` [PATCH 1/7] cxgb4: Add register and message definitions Dimitris Michailidis
  0 siblings, 1 reply; 18+ messages in thread
From: Dimitris Michailidis @ 2010-02-28 16:09 UTC (permalink / raw)
  To: netdev


This is V4 of the cxgb4 patches, which is V3 with need_skb_unmap removed.

 drivers/net/Kconfig            |   25 +
 drivers/net/Makefile           |    1 +
 drivers/net/cxgb4/Makefile     |    7 +
 drivers/net/cxgb4/cxgb4.h      |  735 +++++++
 drivers/net/cxgb4/cxgb4_main.c | 4234 ++++++++++++++++++++++++++++++++++++++++
 drivers/net/cxgb4/cxgb4_uld.h  |  230 +++
 drivers/net/cxgb4/l2t.c        |  626 ++++++
 drivers/net/cxgb4/l2t.h        |  110 ++
 drivers/net/cxgb4/sge.c        | 2438 +++++++++++++++++++++++
 drivers/net/cxgb4/t4_hw.c      | 3119 +++++++++++++++++++++++++++++
 drivers/net/cxgb4/t4_hw.h      |  100 +
 drivers/net/cxgb4/t4_msg.h     |  649 ++++++
 drivers/net/cxgb4/t4_regs.h    |  873 +++++++++
 drivers/net/cxgb4/t4fw_api.h   | 1535 +++++++++++++++
 14 files changed, 14682 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/cxgb4/Makefile
 create mode 100644 drivers/net/cxgb4/cxgb4.h
 create mode 100644 drivers/net/cxgb4/cxgb4_main.c
 create mode 100644 drivers/net/cxgb4/cxgb4_uld.h
 create mode 100644 drivers/net/cxgb4/l2t.c
 create mode 100644 drivers/net/cxgb4/l2t.h
 create mode 100644 drivers/net/cxgb4/sge.c
 create mode 100644 drivers/net/cxgb4/t4_hw.c
 create mode 100644 drivers/net/cxgb4/t4_hw.h
 create mode 100644 drivers/net/cxgb4/t4_msg.h
 create mode 100644 drivers/net/cxgb4/t4_regs.h
 create mode 100644 drivers/net/cxgb4/t4fw_api.h

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2010-02-28 16:09 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-26 23:35 [PATCH 0/7] cxgb4: driver submission V3 Dimitris Michailidis
2010-02-26 23:35 ` [PATCH 1/7] cxgb4: Add register and message definitions Dimitris Michailidis
2010-02-26 23:35   ` [PATCH 2/7] cxgb4: Add FW API definitions Dimitris Michailidis
2010-02-26 23:35     ` [PATCH 3/7] cxgb4: Add HW and FW support code Dimitris Michailidis
2010-02-26 23:35       ` [PATCH 4/7] cxgb4: Add packet queues and packet DMA code Dimitris Michailidis
2010-02-26 23:35         ` [PATCH 5/7] cxgb4: Add remaining driver headers and L2T management Dimitris Michailidis
2010-02-26 23:35           ` [PATCH 6/7] cxgb4: Add main driver file and driver Makefile Dimitris Michailidis
2010-02-26 23:35             ` [PATCH 7/7] net: Hook up cxgb4 to Kconfig and Makefile Dimitris Michailidis
2010-02-26 23:57         ` [PATCH 4/7] cxgb4: Add packet queues and packet DMA code Stephen Hemminger
2010-02-27  9:46           ` David Miller
2010-02-27  0:10 Dimitrios Michailidis
2010-02-27  0:16 ` Stephen Hemminger
2010-02-27  9:48 ` David Miller
2010-02-27 22:41   ` Dimitris Michailidis
2010-02-27  0:52 Dimitrios Michailidis
2010-02-27  1:31 ` Stephen Hemminger
2010-02-27  1:42 Dimitrios Michailidis
2010-02-28 16:09 [PATCH 0/7] cxgb4: driver submission V4 Dimitris Michailidis
2010-02-28 16:09 ` [PATCH 1/7] cxgb4: Add register and message definitions Dimitris Michailidis
2010-02-28 16:09   ` [PATCH 2/7] cxgb4: Add FW API definitions Dimitris Michailidis
2010-02-28 16:09     ` [PATCH 3/7] cxgb4: Add HW and FW support code Dimitris Michailidis
2010-02-28 16:09       ` [PATCH 4/7] cxgb4: Add packet queues and packet DMA code Dimitris Michailidis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.