From patchwork Mon Jun 17 17:23:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 13701115 X-Patchwork-Delegate: kuba@kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78EC416EB74 for ; Mon, 17 Jun 2024 17:24:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718645059; cv=none; b=cFPTWJKC0bQb35dyD9Q+9x84iSArWU/C97Lb2vnCkjrMn422I878TdLSqVUiAf89g1WGjITBiWVySh2Q2+uyigpEip7ouuxFQcF5bj8rREn26GxUUuXWmYTggE2B4Kj2tPKZ5nra9Rry24/cMolHAonDJHdNRJMeka0pfRz1ECg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718645059; c=relaxed/simple; bh=rVZKNmYsCg7Cv0JF3bOovcM69egkCp/oEwpFfMlMSH4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UPciTpnPFDEvPEbZoLdZ47k8ds3811JkFOac1LoqS5EhSkU25v9VPylTlmohvripNzfTIwgYFUaKTADfPwG0XF0GX2KMUb3scBmOwQmnSMxazdiQZczNfR1tkROnSdJ2uamyE6kkW0QyeqH6EmJf3SbUNsEUduftZjXnLY6iymU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=bCSpg+bL; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bCSpg+bL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718645057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q6gKuRAroxdFSIn4AAkyBRetf77gKe9BhwcyD4tozv8=; b=bCSpg+bLP9z2ygsA0FvIxJzpNEPzbVL2athscERIGPIdw3lf0vgq4PhMDweuFXeUngFelS Z9ZAzfvvbKeWuoNFSs6RBcXKXQUDoSUaFC3Mk4kmEOWHAh+L9LYdrT4niiSRoOHpsnJV/s W0cggVVZxXjD2dSpklSMqhcXf6o8zqA= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-367-CYX2mKGnPjSvsE0FEpk0OQ-1; Mon, 17 Jun 2024 13:24:11 -0400 X-MC-Unique: CYX2mKGnPjSvsE0FEpk0OQ-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2DE0B1956094; Mon, 17 Jun 2024 17:24:10 +0000 (UTC) Received: from fedora-x1.redhat.com (unknown [10.22.18.62]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 05CB51955E80; Mon, 17 Jun 2024 17:24:07 +0000 (UTC) From: Kamal Heib To: netdev@vger.kernel.org Cc: Tariq Toukan , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Kamal Heib Subject: [PATCH net-next v2 1/3] net/mlx4_en: Use ethtool_puts to fill priv flags strings Date: Mon, 17 Jun 2024 13:23:27 -0400 Message-ID: <20240617172329.239819-2-kheib@redhat.com> In-Reply-To: <20240617172329.239819-1-kheib@redhat.com> References: <20240617172329.239819-1-kheib@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Patchwork-Delegate: kuba@kernel.org Use the ethtool_puts helper to print the priv flags strings into the ethtool strings interface. Signed-off-by: Kamal Heib Reviewed-by: Simon Horman --- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index 619e1c3ef7f9..50a4a017a3f4 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -536,8 +536,7 @@ static void mlx4_en_get_strings(struct net_device *dev, break; case ETH_SS_PRIV_FLAGS: for (i = 0; i < ARRAY_SIZE(mlx4_en_priv_flags); i++) - strcpy(data + i * ETH_GSTRING_LEN, - mlx4_en_priv_flags[i]); + ethtool_puts(&data, mlx4_en_priv_flags[i]); break; } From patchwork Mon Jun 17 17:23:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 13701116 X-Patchwork-Delegate: kuba@kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6724F16CD28 for ; Mon, 17 Jun 2024 17:24:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718645060; cv=none; b=PHrD6ODwM0WWVEkdVpXsFWtaQsTzgFUuEbgRkN5AaTBF9w0cj/nyO6C5tSW2kpidM/d1aTcnkYFGdLtqLzd/IXYWcfPpVjtKyh0d070/sls4/Rv22rK+ssWD9Uc0oJxM6qCwNIwuIJB3Be+Go+vkmtrCUy6NWwhh7r1na9aVuP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718645060; c=relaxed/simple; bh=YG2wOJc6wqf6dykvFPPXqz7UxsVnzoUzwDDgCZ7l2gI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sNbqenP+5lIafdWkMKpeI1a94JM3X4i97TUFYJzCEnx95hJcyAeFjSBnA4Js0xa28hE+WsMdGnvA8Y1VQHPF1SIA9fAoDUIR102hAy8Ytork+APfs00GyIqlRPvfRYWR6SGR1Dr02+u736zZ+IQg5n5WqcymvE9BkWTWUOHFwns= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=WK8tXsS1; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WK8tXsS1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718645058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wXtY6Uq6DYBobpANnl4PRcqvhCkxs52eoMmMMFAJuVI=; b=WK8tXsS1EtTyp4+JkI1GV3e9bCXSUOHH08ADURZ+KJ/YQWgwMnUhPhOuS03dOoWiCjbUmj qHKboON19rprBFJuVU8XTgu4Us8vkbIJOqhpLmjmu3P02hRjIcDvvswFwn7P/wpdhTUHgr URBg9I2VmvMGuSWohVEfxp1n63MJKOM= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-116-fMv8c_E0PZ-vo3vN6PSQjg-1; Mon, 17 Jun 2024 13:24:13 -0400 X-MC-Unique: fMv8c_E0PZ-vo3vN6PSQjg-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E24551956089; Mon, 17 Jun 2024 17:24:11 +0000 (UTC) Received: from fedora-x1.redhat.com (unknown [10.22.18.62]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 187B01955E83; Mon, 17 Jun 2024 17:24:09 +0000 (UTC) From: Kamal Heib To: netdev@vger.kernel.org Cc: Tariq Toukan , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Kamal Heib Subject: [PATCH net-next v2 2/3] net/mlx4_en: Use ethtool_puts to fill selftest strings Date: Mon, 17 Jun 2024 13:23:28 -0400 Message-ID: <20240617172329.239819-3-kheib@redhat.com> In-Reply-To: <20240617172329.239819-2-kheib@redhat.com> References: <20240617172329.239819-1-kheib@redhat.com> <20240617172329.239819-2-kheib@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Patchwork-Delegate: kuba@kernel.org Use the ethtool_puts helper to print the selftest strings into the ethtool strings interface. Signed-off-by: Kamal Heib Reviewed-by: Simon Horman --- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index 50a4a017a3f4..fee02a94ed2f 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -459,10 +459,10 @@ static void mlx4_en_get_strings(struct net_device *dev, switch (stringset) { case ETH_SS_TEST: for (i = 0; i < MLX4_EN_NUM_SELF_TEST - 2; i++) - strcpy(data + i * ETH_GSTRING_LEN, mlx4_en_test_names[i]); + ethtool_puts(&data, mlx4_en_test_names[i]); if (priv->mdev->dev->caps.flags & MLX4_DEV_CAP_FLAG_UC_LOOPBACK) for (; i < MLX4_EN_NUM_SELF_TEST; i++) - strcpy(data + i * ETH_GSTRING_LEN, mlx4_en_test_names[i]); + ethtool_puts(&data, mlx4_en_test_names[i]); break; case ETH_SS_STATS: From patchwork Mon Jun 17 17:23:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 13701117 X-Patchwork-Delegate: kuba@kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6720517984 for ; Mon, 17 Jun 2024 17:24:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718645062; cv=none; b=JfPOeII5oerI3VKt4Rxx+ak9HYY9NhuSiMbhLaI3fE89ifsPRWTGB08m1NfBgA2gOBZ0D/Kvbl25WPB1MtK4WI92WPjhOJ+1zY0ofJhO00VpDyVTQ9pwGbYy4GvEgzfVM3defu0ZU9dN2tHZaD+II9r4xq6Fh19RdVi05YXcBoc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718645062; c=relaxed/simple; bh=MzhSEDPxfaxdDmUQii5diptIm4iMx5LkmGh/k02/ExA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Cw6pBCkqAlDiZQtYp0wPifb+C/aCqFzOBohmeBlEfcEkFFByuJOarRBN53jXEBSCitEX+aGN+QySODl2/Kp4PgojXhGlCsy0x6O77zAGc0Pc5XPJ/jOXdHptUtbTDsIRDU+WFwgn60g7bpcAc4EepAIR9uoIII66Vra5g1TU42E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=b4Bq3LOe; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="b4Bq3LOe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718645058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GWtqChJRo/vKwRQIq200bptC+lJDdv6T3aSZWcIpXik=; b=b4Bq3LOebAj5XDhnTqKijp/j0VLUxGiqg6TyJT9ALO2pFvqY5US3C2kh9Epkks9vduOphy WuChNFIvqb89juSLpicSfgSddH0U64Gqy1o+eCfmh6SMYhz1ZCh8oLAQDbp9kOAxllhdwB ceMoCANkj8XrtEvZZ0mb6zXrfwujvtc= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-266-hA-47vQkNYSPQB0Aq267Aw-1; Mon, 17 Jun 2024 13:24:15 -0400 X-MC-Unique: hA-47vQkNYSPQB0Aq267Aw-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 589DA19560AD; Mon, 17 Jun 2024 17:24:13 +0000 (UTC) Received: from fedora-x1.redhat.com (unknown [10.22.18.62]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E6EF71955E80; Mon, 17 Jun 2024 17:24:11 +0000 (UTC) From: Kamal Heib To: netdev@vger.kernel.org Cc: Tariq Toukan , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Kamal Heib Subject: [PATCH net-next v2 3/3] net/mlx4_en: Use ethtool_puts/sprintf to fill stats strings Date: Mon, 17 Jun 2024 13:23:29 -0400 Message-ID: <20240617172329.239819-4-kheib@redhat.com> In-Reply-To: <20240617172329.239819-3-kheib@redhat.com> References: <20240617172329.239819-1-kheib@redhat.com> <20240617172329.239819-2-kheib@redhat.com> <20240617172329.239819-3-kheib@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Patchwork-Delegate: kuba@kernel.org Use the ethtool_puts/ethtool_sprintf helper to print the stats strings into the ethtool strings interface. Signed-off-by: Kamal Heib Reviewed-by: Simon Horman --- .../net/ethernet/mellanox/mlx4/en_ethtool.c | 52 ++++++------------- 1 file changed, 17 insertions(+), 35 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index fee02a94ed2f..0606f18e5bbe 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -450,7 +450,6 @@ static void mlx4_en_get_strings(struct net_device *dev, uint32_t stringset, uint8_t *data) { struct mlx4_en_priv *priv = netdev_priv(dev); - int index = 0; int i, strings = 0; struct bitmap_iterator it; @@ -470,68 +469,51 @@ static void mlx4_en_get_strings(struct net_device *dev, for (i = 0; i < NUM_MAIN_STATS; i++, strings++, bitmap_iterator_inc(&it)) if (bitmap_iterator_test(&it)) - strcpy(data + (index++) * ETH_GSTRING_LEN, - main_strings[strings]); + ethtool_puts(&data, main_strings[strings]); for (i = 0; i < NUM_PORT_STATS; i++, strings++, bitmap_iterator_inc(&it)) if (bitmap_iterator_test(&it)) - strcpy(data + (index++) * ETH_GSTRING_LEN, - main_strings[strings]); + ethtool_puts(&data, main_strings[strings]); for (i = 0; i < NUM_PF_STATS; i++, strings++, bitmap_iterator_inc(&it)) if (bitmap_iterator_test(&it)) - strcpy(data + (index++) * ETH_GSTRING_LEN, - main_strings[strings]); + ethtool_puts(&data, main_strings[strings]); for (i = 0; i < NUM_FLOW_STATS; i++, strings++, bitmap_iterator_inc(&it)) if (bitmap_iterator_test(&it)) - strcpy(data + (index++) * ETH_GSTRING_LEN, - main_strings[strings]); + ethtool_puts(&data, main_strings[strings]); for (i = 0; i < NUM_PKT_STATS; i++, strings++, bitmap_iterator_inc(&it)) if (bitmap_iterator_test(&it)) - strcpy(data + (index++) * ETH_GSTRING_LEN, - main_strings[strings]); + ethtool_puts(&data, main_strings[strings]); for (i = 0; i < NUM_XDP_STATS; i++, strings++, bitmap_iterator_inc(&it)) if (bitmap_iterator_test(&it)) - strcpy(data + (index++) * ETH_GSTRING_LEN, - main_strings[strings]); + ethtool_puts(&data, main_strings[strings]); for (i = 0; i < NUM_PHY_STATS; i++, strings++, bitmap_iterator_inc(&it)) if (bitmap_iterator_test(&it)) - strcpy(data + (index++) * ETH_GSTRING_LEN, - main_strings[strings]); + ethtool_puts(&data, main_strings[strings]); for (i = 0; i < priv->tx_ring_num[TX]; i++) { - sprintf(data + (index++) * ETH_GSTRING_LEN, - "tx%d_packets", i); - sprintf(data + (index++) * ETH_GSTRING_LEN, - "tx%d_bytes", i); + ethtool_sprintf(&data, "tx%d_packets", i); + ethtool_sprintf(&data, "tx%d_bytes", i); } for (i = 0; i < priv->rx_ring_num; i++) { - sprintf(data + (index++) * ETH_GSTRING_LEN, - "rx%d_packets", i); - sprintf(data + (index++) * ETH_GSTRING_LEN, - "rx%d_bytes", i); - sprintf(data + (index++) * ETH_GSTRING_LEN, - "rx%d_dropped", i); - sprintf(data + (index++) * ETH_GSTRING_LEN, - "rx%d_xdp_drop", i); - sprintf(data + (index++) * ETH_GSTRING_LEN, - "rx%d_xdp_redirect", i); - sprintf(data + (index++) * ETH_GSTRING_LEN, - "rx%d_xdp_redirect_fail", i); - sprintf(data + (index++) * ETH_GSTRING_LEN, - "rx%d_xdp_tx", i); - sprintf(data + (index++) * ETH_GSTRING_LEN, - "rx%d_xdp_tx_full", i); + ethtool_sprintf(&data, "rx%d_packets", i); + ethtool_sprintf(&data, "rx%d_bytes", i); + ethtool_sprintf(&data, "rx%d_dropped", i); + ethtool_sprintf(&data, "rx%d_xdp_drop", i); + ethtool_sprintf(&data, "rx%d_xdp_redirect", i); + ethtool_sprintf(&data, "rx%d_xdp_redirect_fail", i); + ethtool_sprintf(&data, "rx%d_xdp_tx", i); + ethtool_sprintf(&data, "rx%d_xdp_tx_full", i); } break; case ETH_SS_PRIV_FLAGS: