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]
Date:	Tue, 10 Jul 2012 14:26:20 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Or Gerlitz <ogerlitz@...lanox.com>
Cc:	davem@...emloft.net, roland@...nel.org, netdev@...r.kernel.org,
	ali@...lanox.com, sean.hefty@...el.com,
	Erez Shitrit <erezsh@...lanox.co.il>
Subject: Re: [PATCH net-next 3/9] IB/ipoib: Add support for acting as VIF

On Tue, 2012-07-10 at 15:16 +0300, Or Gerlitz wrote:
> From: Erez Shitrit <erezsh@...lanox.co.il>
> 
> When IPoIB interface acts as a VIF for an eIPoIB interface, it uses
> the skb cb storage area on the RX flow, to place information which
> can be of use to the upper layer device.
> 
> One such usage example, is when an eIPoIB inteface needs to generate
> a source mac for incoming Ethernet frames.
> 
> The IPoIB code checks the VIF private flag on the RX path, and accoriding
> to the value of the flag prepares the skb CB data, etc.
> 

...

> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> index 5c1bc99..da28799 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> @@ -300,7 +300,13 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
>  			likely(wc->wc_flags & IB_WC_IP_CSUM_OK))
>  		skb->ip_summed = CHECKSUM_UNNECESSARY;
>  
> -	napi_gro_receive(&priv->napi, skb);
> +	/* if handler is registered on top of ipoib, set skb oob data */
> +	if (dev->priv_flags & IFF_EIPOIB_VIF) {
> +		set_skb_oob_cb_data(skb, wc, &priv->napi);
> +		/* the registered handler will take care of the skb */
> +		netif_receive_skb(skb);
> +	} else
> +		napi_gro_receive(&priv->napi, skb);

skb->cb[] can be destroyed in netif_receive_skb() /
__netif_receive_skb()

#ifdef CONFIG_NET_CLS_ACT
	skb = handle_ing(skb, &pt_prev, &ret, orig_dev);
	...
#endif



--
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