Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2018-10-19 14:33:42 +0200
committerMichal Kubecek <mkubecek@suse.cz>2018-10-19 14:33:42 +0200
commit53fd97f72436f0066236d1adba12980be8114712 (patch)
treebe4dd8d05510d1f2ec1eb1fc686ec25cbb0629b3
parentbdc93bbf524ef2e4c4b4d7b69fb280572da949c7 (diff)
net/core: Add drop counters to VF statistics (fate#326021).
-rw-r--r--patches.suse/net-core-Add-drop-counters-to-VF-statistics.patch78
-rw-r--r--series.conf1
2 files changed, 79 insertions, 0 deletions
diff --git a/patches.suse/net-core-Add-drop-counters-to-VF-statistics.patch b/patches.suse/net-core-Add-drop-counters-to-VF-statistics.patch
new file mode 100644
index 0000000000..38951173ea
--- /dev/null
+++ b/patches.suse/net-core-Add-drop-counters-to-VF-statistics.patch
@@ -0,0 +1,78 @@
+From: Eugenia Emantayev <eugenia@mellanox.com>
+Date: Mon, 17 Jul 2017 13:47:07 +0300
+Subject: net/core: Add drop counters to VF statistics
+Patch-mainline: v4.16-rc1
+Git-commit: c5a9f6f0ab4054082dd5ce9bbdaa8e8ff05cf365
+References: fate#326021
+
+Modern hardware can decide to drop packets going to/from a VF.
+Add receive and transmit drop counters to be displayed at hypervisor
+layer in iproute2 per VF statistics.
+
+Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Acked-by: Michal Kubecek <mkubecek@suse.cz>
+
+---
+ include/linux/if_link.h | 2 ++
+ include/uapi/linux/if_link.h | 2 ++
+ net/core/rtnetlink.c | 10 +++++++++-
+ 3 files changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/include/linux/if_link.h b/include/linux/if_link.h
+index 0b17c585b5cd..e0520a3c5486 100644
+--- a/include/linux/if_link.h
++++ b/include/linux/if_link.h
+@@ -12,6 +12,8 @@ struct ifla_vf_stats {
+ __u64 tx_bytes;
+ __u64 broadcast;
+ __u64 multicast;
++ __u64 rx_dropped;
++ __u64 tx_dropped;
+ };
+
+ struct ifla_vf_info {
+diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
+index 8d062c58d5cb..01729ac1c38e 100644
+--- a/include/uapi/linux/if_link.h
++++ b/include/uapi/linux/if_link.h
+@@ -723,6 +723,8 @@ enum {
+ IFLA_VF_STATS_BROADCAST,
+ IFLA_VF_STATS_MULTICAST,
+ IFLA_VF_STATS_PAD,
++ IFLA_VF_STATS_RX_DROPPED,
++ IFLA_VF_STATS_TX_DROPPED,
+ __IFLA_VF_STATS_MAX,
+ };
+
+diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
+index 66299346fe2a..a86fad006b06 100644
+--- a/net/core/rtnetlink.c
++++ b/net/core/rtnetlink.c
+@@ -867,6 +867,10 @@ static inline int rtnl_vfinfo_size(const struct net_device *dev,
+ nla_total_size_64bit(sizeof(__u64)) +
+ /* IFLA_VF_STATS_MULTICAST */
+ nla_total_size_64bit(sizeof(__u64)) +
++ /* IFLA_VF_STATS_RX_DROPPED */
++ nla_total_size_64bit(sizeof(__u64)) +
++ /* IFLA_VF_STATS_TX_DROPPED */
++ nla_total_size_64bit(sizeof(__u64)) +
+ nla_total_size(sizeof(struct ifla_vf_trust)));
+ return size;
+ } else
+@@ -1219,7 +1223,11 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb,
+ nla_put_u64_64bit(skb, IFLA_VF_STATS_BROADCAST,
+ vf_stats.broadcast, IFLA_VF_STATS_PAD) ||
+ nla_put_u64_64bit(skb, IFLA_VF_STATS_MULTICAST,
+- vf_stats.multicast, IFLA_VF_STATS_PAD)) {
++ vf_stats.multicast, IFLA_VF_STATS_PAD) ||
++ nla_put_u64_64bit(skb, IFLA_VF_STATS_RX_DROPPED,
++ vf_stats.rx_dropped, IFLA_VF_STATS_PAD) ||
++ nla_put_u64_64bit(skb, IFLA_VF_STATS_TX_DROPPED,
++ vf_stats.tx_dropped, IFLA_VF_STATS_PAD)) {
+ nla_nest_cancel(skb, vfstats);
+ goto nla_put_vf_failure;
+ }
+--
+2.19.1
+
diff --git a/series.conf b/series.conf
index 05aacec90d..cb79bc5460 100644
--- a/series.conf
+++ b/series.conf
@@ -12910,6 +12910,7 @@
patches.drivers/ixgbe-Drop-l2_accel_priv-data-pointer-from-ring-stru.patch
patches.drivers/net-hns3-report-the-function-type-the-same-line-with.patch
patches.drivers/net-mlx5e-IPoIB-Use-correct-timestamp-in-child-recei.patch
+ patches.suse/net-core-Add-drop-counters-to-VF-statistics.patch
patches.drivers/cxgb4vf-Fix-SGE-FL-buffer-initialization-logic-for-6.patch
patches.drivers/cxgb4-add-data-structures-to-support-vxlan.patch
patches.drivers/cxgb4-implement-udp-tunnel-callbacks.patch