[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170131.132701.722163772922806769.davem@davemloft.net>
Date: Tue, 31 Jan 2017 13:27:01 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: michael.chan@...adcom.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next 01/10] bnxt_en: Refactor rx SKB function.
From: Michael Chan <michael.chan@...adcom.com>
Date: Mon, 30 Jan 2017 20:49:26 -0500
> @@ -776,7 +778,7 @@ static struct sk_buff *bnxt_rx_skb(struct bnxt *bp,
> }
>
> skb_reserve(skb, BNXT_RX_OFFSET);
> - skb_put(skb, len);
> + skb_put(skb, len & 0xffff);
> return skb;
> }
>
Like Jakub I wonder about this.
The caller extracts the length field out of the descriptor using a
right shift of an unsigned value by 16 bits. The mask seems
completely unnecessary.
If it is needed, perhaps due to some subsequent change, then please
document it and pair the change with the part the necessitates it.
Thank you.
Powered by blists - more mailing lists