netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org,
	rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org,
	yosefe-smomgflXvOZWk0Htik3J/w@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [IPoIB] Identify multicast packets and fix IGMP breakage V2
Date: Thu, 26 Aug 2010 16:21:46 -0600	[thread overview]
Message-ID: <20100826222146.GA23025@obsidianresearch.com> (raw)
In-Reply-To: <20100826.151553.242147157.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

On Thu, Aug 26, 2010 at 03:15:53PM -0700, David Miller wrote:
> From: Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>
> Date: Thu, 26 Aug 2010 16:31:14 -0500 (CDT)
> 
> > @@ -271,6 +271,13 @@ static void ipoib_ib_handle_rx_wc(struct
> >  	ipoib_ud_dma_unmap_rx(priv, mapping);
> >  	ipoib_ud_skb_put_frags(priv, skb, wc->byte_len);
> > 
> > +	if ((wc->wc_flags & IB_WC_GRH) &&
> > +		IN6_IS_ADDR_MULTICAST(&((struct ipv6hdr *)skb->data)->daddr))
> > +
> > +		skb->pkt_type = PACKET_MULTICAST;
> > +	else
> > +		skb->pkt_type = PACKET_HOST;
> 
> I really don't think you can assume there is an ipv6 header here
> at all.

The 40 bytes at this location are defined by the HW specification to
be an IB GRH which has an identical layout to an IPv6 header. Roland
is right, it would be clearer to use ib_grh ->dgid

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-08-26 22:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.DEB.2.00.1008231210010.9840@router.home>
     [not found] ` <20100823174110.GK26549@obsidianresearch.com>
     [not found]   ` <alpine.DEB.2.00.1008231317150.10719@router.home>
     [not found]     ` <20100823183044.GM26549@obsidianresearch.com>
     [not found]       ` <alpine.DEB.2.00.1008261453510.21466@router.home>
     [not found]         ` <adapqx5rtez.fsf@cisco.com>
     [not found]           ` <alpine.DEB.2.00.1008261613160.24174@router.home>
     [not found]             ` <alpine.DEB.2.00.1008261613160.24174-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-26 21:31               ` [IPoIB] Identify multicast packets and fix IGMP breakage V2 Christoph Lameter
     [not found]                 ` <alpine.DEB.2.00.1008261629440.24174-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-26 22:15                   ` David Miller
     [not found]                     ` <20100826.151553.242147157.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2010-08-26 22:21                       ` Jason Gunthorpe [this message]
     [not found]                         ` <20100826222146.GA23025-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-08-26 23:26                           ` [IPoIB] Identify multicast packets and fix IGMP breakage V3 Christoph Lameter
     [not found]                             ` <alpine.DEB.2.00.1008261825490.26351-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-26 23:43                               ` Jason Gunthorpe
2010-08-26 23:57                                 ` Christoph Lameter
     [not found]                                   ` <alpine.DEB.2.00.1008261856090.29657-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-27  0:07                                     ` David Miller
2010-08-27  2:24                                       ` Christoph Lameter
     [not found]                                 ` <20100826234342.GA24333-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-08-27  0:02                                   ` Yossi Etigin
     [not found]                                     ` <7E95F01E94AB484F83061FCFA35B39F89BE276-QfUkFaTmzUSUvQqKE/ONIwC/G2K4zDHf@public.gmane.org>
2010-08-27  0:17                                       ` Jason Gunthorpe
2010-08-27 13:29                                   ` Christoph Lameter
2010-09-14  7:27                                     ` Or Gerlitz
     [not found]                                       ` <4C8F23DB.2040105-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2010-09-14 14:02                                         ` Christoph Lameter
     [not found]                                     ` <alpine.DEB.2.00.1008270827280.11792-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-09-28 18:09                                       ` Roland Dreier

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=20100826222146.GA23025@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org \
    --cc=rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=yosefe-smomgflXvOZWk0Htik3J/w@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).