diff mbox

[ethtool] rxclass: Show full 64 bits of user-data in rxclass_print_nfc_spec_ext()

Message ID 1358886835.2892.14.camel@bwh-desktop.uk.solarflarecom.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Ben Hutchings Jan. 22, 2013, 8:33 p.m. UTC
Previously only the lower 32 bits would be shown.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
I just noticed this bug when applying Yan Burman's patch.  Untested
since sfc doesn't support this field.

Ben.

 rxclass.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Duyck, Alexander H Jan. 22, 2013, 9:07 p.m. UTC | #1
On 01/22/2013 12:33 PM, Ben Hutchings wrote:
> Previously only the lower 32 bits would be shown.
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
> I just noticed this bug when applying Yan Burman's patch.  Untested
> since sfc doesn't support this field.
> 
> Ben.
> 
>  rxclass.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/rxclass.c b/rxclass.c
> index 1564b62..cd686a3 100644
> --- a/rxclass.c
> +++ b/rxclass.c
> @@ -49,7 +49,7 @@ static void rxclass_print_nfc_spec_ext(struct ethtool_rx_flow_spec *fsp)
>  		tci = ntohs(fsp->h_ext.vlan_tci);
>  		tcim = ntohs(~fsp->m_ext.vlan_tci);
>  		data = (u64)ntohl(fsp->h_ext.data[0]) << 32;
> -		data = (u64)ntohl(fsp->h_ext.data[1]);
> +		data |= (u64)ntohl(fsp->h_ext.data[1]);
>  		datam = (u64)ntohl(~fsp->m_ext.data[0]) << 32;
>  		datam |= (u64)ntohl(~fsp->m_ext.data[1]);
>  
> 

This looks fine to me.  We didn't use data[0] in ixgbe so we never
noticed this either.

Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/rxclass.c b/rxclass.c
index 1564b62..cd686a3 100644
--- a/rxclass.c
+++ b/rxclass.c
@@ -49,7 +49,7 @@  static void rxclass_print_nfc_spec_ext(struct ethtool_rx_flow_spec *fsp)
 		tci = ntohs(fsp->h_ext.vlan_tci);
 		tcim = ntohs(~fsp->m_ext.vlan_tci);
 		data = (u64)ntohl(fsp->h_ext.data[0]) << 32;
-		data = (u64)ntohl(fsp->h_ext.data[1]);
+		data |= (u64)ntohl(fsp->h_ext.data[1]);
 		datam = (u64)ntohl(~fsp->m_ext.data[0]) << 32;
 		datam |= (u64)ntohl(~fsp->m_ext.data[1]);