Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Or Gerlitz <ogerlitz@mellanox.com>
Cc: davem@davemloft.net, roland@kernel.org, netdev@vger.kernel.org,
	ali@mellanox.com, sean.hefty@intel.com,
	Erez Shitrit <erezsh@mellanox.co.il>
Subject: Re: [PATCH net-next 3/9] IB/ipoib: Add support for acting as VIF
Date: Tue, 10 Jul 2012 14:26:20 +0200	[thread overview]
Message-ID: <1341923180.3265.5005.camel@edumazet-glaptop> (raw)
In-Reply-To: <1341922569-4118-4-git-send-email-ogerlitz@mellanox.com>

On Tue, 2012-07-10 at 15:16 +0300, Or Gerlitz wrote:
> From: Erez Shitrit <erezsh@mellanox.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

  reply	other threads:[~2012-07-10 12:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 12:16 [PATCH net-next 0/9] Add Ethernet IPoIB driver Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 1/9] IB/ipoib: Add support for clones / multiple childs on the same partition Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 2/9] include/linux: Add private flags for IPoIB interfaces Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 3/9] IB/ipoib: Add support for acting as VIF Or Gerlitz
2012-07-10 12:26   ` Eric Dumazet [this message]
2012-07-11  8:05     ` Or Gerlitz
2012-07-11  8:19       ` David Miller
2012-07-11  9:59         ` Or Gerlitz
2012-07-11 10:06           ` David Miller
2012-07-11 10:27             ` Eric Dumazet
2012-07-11 11:46               ` Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 4/9] net/eipoib: Add private header file Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 5/9] net/eipoib: Add ethtool file support Or Gerlitz
2012-07-10 17:48   ` Ben Hutchings
2012-07-11  8:40     ` Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 6/9] net/eipoib: Add sysfs support Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 7/9] net/eipoib: Add main driver functionality Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 8/9] net/eipoib: Add Makefile, Kconfig and MAINTAINERS entries Or Gerlitz
2012-07-10 12:16 ` [PATCH net-next 9/9] IB/ipoib: Add support for transmission of skbs w.o dst/neighbour Or Gerlitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1341923180.3265.5005.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=ali@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=erezsh@mellanox.co.il \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=roland@kernel.org \
    --cc=sean.hefty@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox