Jakub Kicinski [mailto:jakub.kicin...@netronome.com]
> Sent: Wednesday, August 07, 2019 6:08 AM
[...]
> >  #define RTL8152_REQT_READ  0xc0
> > @@ -720,7 +723,7 @@ struct r8152 {
> >     struct net_device *netdev;
> >     struct urb *intr_urb;
> >     struct tx_agg tx_info[RTL8152_MAX_TX];
> > -   struct list_head rx_info;
> > +   struct list_head rx_info, rx_used;
> 
> I don't see where entries on the rx_used list get freed when driver is
> unloaded, could you explain how that's taken care of?

When the driver is unloaded, all rx_agg would be freed from
info_list list.

The info_list includes all rx_agg buffers which may be idle
or be busy. The rx_done and rx_use are used to determine
the status of rx_agg buffer included in info_list.

info_list: the rx_agg buffer would be inserted in this list
           when it is allocated.
rx_done: the rx_agg buffer is ready (contains rx data). Or
         it needs to be resubmitted.
rx_use: the rx_agg buffer is busy and couldn't be submitted
        yet.


Best Regards,
Hayes


Reply via email to