lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1412190559.16704.59.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Wed, 01 Oct 2014 12:09:19 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Sowmini Varadhan <sowmini.varadhan@...cle.com>
Cc:	davem@...emloft.net, raghuram.kothakota@...cle.com,
	netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] sunvnet: Process Rx data packets in a BH
 handler

On Wed, 2014-10-01 at 14:56 -0400, Sowmini Varadhan wrote:
> Move VIO DATA processing out of interrupt context,
> and into a bottom-half handler (vnet_event_bh())
> 
> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@...cle.com>
> Acked-by: Raghuram Kothakota <raghuram.kothakota@...cle.com>
> 
> ---
>  drivers/net/ethernet/sun/sunvnet.c | 126 ++++++++++++++++++++++++-------------
>  drivers/net/ethernet/sun/sunvnet.h |  10 ++-
>  2 files changed, 91 insertions(+), 45 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
> index 1262697..e2aacf5 100644
> --- a/drivers/net/ethernet/sun/sunvnet.c
> +++ b/drivers/net/ethernet/sun/sunvnet.c
> @@ -274,6 +274,7 @@ static struct sk_buff *alloc_and_align_skb(struct net_device *dev,
>  	return skb;
>  }
>  
> +/* reads in exactly one sk_buff */
>  static int vnet_rx_one(struct vnet_port *port, unsigned int len,
>  		       struct ldc_trans_cookie *cookies, int ncookies)
>  {
> @@ -311,9 +312,8 @@ static int vnet_rx_one(struct vnet_port *port, unsigned int len,
>  
>  	dev->stats.rx_packets++;
>  	dev->stats.rx_bytes += len;
> -
> -	netif_rx(skb);
> -
> +	/* BH context cannot call netif_receive_skb */
> +	netif_rx_ni(skb);

Really ? What about the standard and less expensive netif_receive_skb ?



>  	u64			rmtu;
> +
> +	struct mutex            vnet_rx_mutex; /* serializes rx_workq */
> +	struct work_struct      rx_work;
> +	struct workqueue_struct *rx_workq;
> +
>  };
>  

Could you describe in the changelog why all this is needed ?



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ