aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2011-04-08 14:01:59 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-11 16:20:49 -0400
commit127fe533ae56d7f4e7b5011869870982eba25723 (patch)
tree05a0752df856b975524fb1dbb302c2c84253aab9 /net/socket.c
parent5d9f11cf5038587cc53975deb8beaa1a876a7a7b (diff)
v3 ethtool: add ntuple flow specifier data to network flow classifier
This change is meant to add an ntuple data extensions to the rx network flow classification specifiers. The idea is to allow ntuple to be displayed via the network flow classification interface. The first patch had some left over stuff from the original flow extension flags I had added. That bit is removed in this patch. The second had some left over comments that stated we ignored bits in the masks when we actually match them. This work is based on input from Ben Hutchings. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/socket.c b/net/socket.c
index 5212447c86e7..575c84f2af19 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2643,13 +2643,13 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
2643 return -EFAULT; 2643 return -EFAULT;
2644 2644
2645 if (convert_in) { 2645 if (convert_in) {
2646 /* We expect there to be holes between fs.m_u and 2646 /* We expect there to be holes between fs.m_ext and
2647 * fs.ring_cookie and at the end of fs, but nowhere else. 2647 * fs.ring_cookie and at the end of fs, but nowhere else.
2648 */ 2648 */
2649 BUILD_BUG_ON(offsetof(struct compat_ethtool_rxnfc, fs.m_u) + 2649 BUILD_BUG_ON(offsetof(struct compat_ethtool_rxnfc, fs.m_ext) +
2650 sizeof(compat_rxnfc->fs.m_u) != 2650 sizeof(compat_rxnfc->fs.m_ext) !=
2651 offsetof(struct ethtool_rxnfc, fs.m_u) + 2651 offsetof(struct ethtool_rxnfc, fs.m_ext) +
2652 sizeof(rxnfc->fs.m_u)); 2652 sizeof(rxnfc->fs.m_ext));
2653 BUILD_BUG_ON( 2653 BUILD_BUG_ON(
2654 offsetof(struct compat_ethtool_rxnfc, fs.location) - 2654 offsetof(struct compat_ethtool_rxnfc, fs.location) -
2655 offsetof(struct compat_ethtool_rxnfc, fs.ring_cookie) != 2655 offsetof(struct compat_ethtool_rxnfc, fs.ring_cookie) !=
@@ -2657,7 +2657,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
2657 offsetof(struct ethtool_rxnfc, fs.ring_cookie)); 2657 offsetof(struct ethtool_rxnfc, fs.ring_cookie));
2658 2658
2659 if (copy_in_user(rxnfc, compat_rxnfc, 2659 if (copy_in_user(rxnfc, compat_rxnfc,
2660 (void *)(&rxnfc->fs.m_u + 1) - 2660 (void *)(&rxnfc->fs.m_ext + 1) -
2661 (void *)rxnfc) || 2661 (void *)rxnfc) ||
2662 copy_in_user(&rxnfc->fs.ring_cookie, 2662 copy_in_user(&rxnfc->fs.ring_cookie,
2663 &compat_rxnfc->fs.ring_cookie, 2663 &compat_rxnfc->fs.ring_cookie,
@@ -2674,7 +2674,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)
2674 2674
2675 if (convert_out) { 2675 if (convert_out) {
2676 if (copy_in_user(compat_rxnfc, rxnfc, 2676 if (copy_in_user(compat_rxnfc, rxnfc,
2677 (const void *)(&rxnfc->fs.m_u + 1) - 2677 (const void *)(&rxnfc->fs.m_ext + 1) -
2678 (const void *)rxnfc) || 2678 (const void *)rxnfc) ||
2679 copy_in_user(&compat_rxnfc->fs.ring_cookie, 2679 copy_in_user(&compat_rxnfc->fs.ring_cookie,
2680 &rxnfc->fs.ring_cookie, 2680 &rxnfc->fs.ring_cookie,