OpenVZ Forum


Home » Mailing lists » Devel » Re: [PATCH] net: Add etun driver
Re: [PATCH] net: Add etun driver [message #18089] Fri, 06 April 2007 20:57 Go to next message
Roland Dreier is currently offline  Roland Dreier
Messages: 1
Registered: April 2007
Junior Member
> +/*
 > + * The higher levels take care of making this non-reentrant (it's
 > + * called with bh's disabled).
 > + */
 > +static int etun_xmit(struct sk_buff *skb, struct net_device *tx_dev)

You have this comment, but then...

 > +	dev->features		= NETIF_F_FRAGLIST
 > +				  | NETIF_F_HIGHDMA
 > +				  | NETIF_F_LLTX;

you set LLTX, which means that the upper layers _don't_ make sure that
your xmit routine is not reentrant.

It looks like the impact of multiple simultaneous xmit calls is just
the possibility of screwing up the statistics, but still I think you
want to drop the LLTX feature (since you have no lock of your own to
try and take).
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [PATCH] net: Add etun driver [message #18104 is a reply to message #18089] Sat, 07 April 2007 02:08 Go to previous message
ebiederm is currently offline  ebiederm
Messages: 1354
Registered: February 2006
Senior Member
Roland Dreier <rdreier@cisco.com> writes:

>  > +/*
>  > + * The higher levels take care of making this non-reentrant (it's
>  > + * called with bh's disabled).
>  > + */
>  > +static int etun_xmit(struct sk_buff *skb, struct net_device *tx_dev)
>
> You have this comment, but then...
>
>  > +	dev->features		= NETIF_F_FRAGLIST
>  > +				  | NETIF_F_HIGHDMA
>  > +				  | NETIF_F_LLTX;
>
> you set LLTX, which means that the upper layers _don't_ make sure that
> your xmit routine is not reentrant.
>
> It looks like the impact of multiple simultaneous xmit calls is just
> the possibility of screwing up the statistics, but still I think you
> want to drop the LLTX feature (since you have no lock of your own to
> try and take).

Yup.  That is an inconsistency and probably a bug.  I have to think
through what makes most sense in this case.  Though the cheap answer
is clearly to remove NETIF_F_LLTX.


_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: Re: [ckrm-tech] [PATCH 3/7] Containers (V8): Add generic multi-subsystem API to containers
Next Topic: Re: [patch 0/8] unprivileged mount syscall
Goto Forum:
  


Current Time: Mon Oct 06 13:51:13 GMT 2025

Total time taken to generate the page: 0.24695 seconds