Re: [PATCH for-next v4 09/13] RDMA/rxe: Replaced keyed rxe objects by indexed objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 03, 2021 at 12:02:38AM -0500, Bob Pearson wrote:
> +	if (mgid->raw[10] == 0xff && mgid->raw[11] == 0xff) {
> +		if ((mgid->raw[12] & 0xf0) != 0xe0)
> +			pr_info("mgid is not an ipv4 mc address\n");
> +
> +		/* mgid is a mapped IPV4 multicast address
> +		 * use the 32 bits as an index which will be
> +		 * unique
> +		 */
> +		index = be32_to_cpu(val32[3]);
> +	} else {
> +		if (mgid->raw[0] != 0xff)
> +			pr_info("mgid is not an ipv6 mc address\n");
> +
> +		/* mgid is an IPV6 multicast address which won't
> +		 * fit into the index so construct the index
> +		 * from the four 32 bit words in mgid.
> +		 * If there is a collision treat it like
> +		 * no memory and return NULL
> +		 */
> +		index = be32_to_cpu(val32[0] ^ val32[1]);
> +		index = (index << 32) | be32_to_cpu(val32[2] ^ val32[3]);

I'm not sure failing is such a good thing, can it chain them on a
linked list or something?

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux