--- ethtool-5.3/ethtool.c	2020-07-10 18:28:09.181813744 +0200
+++ src/ethtool.c	2020-07-10 15:17:23.126022416 +0200
@@ -5298,6 +5298,47 @@
 	return 0;
 }
 
+static int do_set_shaper_params(struct cmd_context *ctx)
+{
+	struct ethtool_shaper_params p;
+	int rv;
+
+	memset(&p, 0, sizeof (p));
+	p.cmd = ETHTOOL_SSHAPER_PARAMS;
+	p.rate = get_u32(ctx->argp[0], 10) * 1000000;
+	p.burst = get_u32(ctx->argp[1], 10);
+	p.mtu = get_u32(ctx->argp[2], 10);
+
+	rv = send_ioctl(ctx, &p);
+	if (rv != 0) {
+		perror("Cannot set TX shaper params");
+		return rv;
+	}
+
+	return 0;
+}
+
+static int do_get_shaper_params(struct cmd_context *ctx)
+{
+	struct ethtool_shaper_params p;
+	int rv;
+
+	memset(&p, 0, sizeof (p));
+	p.cmd = ETHTOOL_GSHAPER_PARAMS;
+
+	rv = send_ioctl(ctx, &p);
+	if (rv) {
+		perror("Cannot get TX shaper params");
+		return rv;
+	}
+
+	printf("TX shaper params:\n");
+	printf(" rate:  %u Mbits/s\n", p.rate / 1000000);
+	printf(" burst: %u bits\n", p.burst);
+	printf(" mtu:   %u bits\n", p.mtu);
+	return 0;
+}
+
 static int do_perqueue(struct cmd_context *ctx);
 
 #ifndef TEST_ETHTOOL
@@ -5499,6 +5540,8 @@
 	  "		[ encoding auto|off|rs|baser [...]]\n"},
 	{ "--show-epon-param", 1, do_show_epon_param, "Show EPON params"},
 	{ "--set-mac-mode", 1, do_set_mac_mode, "Change MAC mode"},
+	{ "--set-tx-shaper-param", 1, do_set_shaper_params, "Set HW TX shaper params" },
+	{ "--get-tx-shaper-param", 1, do_get_shaper_params, "Get HW TX shaper params" },
 	{ "-Q|--per-queue", 1, do_perqueue, "Apply per-queue command."
 	  "The supported sub commands include --show-coalesce, --coalesce",
 	  "             [queue_mask %x] SUB_COMMAND\n"},
