This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: mbuf leakage in if_i82559.c ?
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Larice Robert <larice at vidisys dot de>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: 20 Nov 2003 06:41:21 -0700
- Subject: Re: [ECOS] mbuf leakage in if_i82559.c ?
- Organization: MLB Associates
- References: <200311201234.hAKCYnK17016@doms.vidisys.com>
On Thu, 2003-11-20 at 05:34, Larice Robert wrote:
> Hello,
>
> i think there is possible mbuf leakage in if_i82559.c
> could you please verify this ?
>
> as far as i understand this, eth_drv.c hands over responsibility for mbufs
> to if_i82559.c with the parameter key of the function i82559_send(...key...)
>
> later if_i82599.c gives them back to eth_drv.c with the parameter key
> of the function eth_drv_tx_done(...key...)
>
> BUT, when i82559_send thinks its queue is full, it will simply drop this
> key. is this ok ? is there somewhere another cleanup mechanism which
> i've not seen so far ?
>
This would be a leak - if it could happen. However, it should never
happen since the XXX_send() routine will only be called if the
XXX_can_send() routine says that the device has space. So if there
*is* space, then the packet would not be dropped, so there is no leak.
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss