On Tue, Aug 30, 2022 at 09:30:33AM +0200, Kurt Kanzenbach wrote:
> ptp4l supports setting of socket priority. This is useful for traffic shaping
> e.g., utilizing Tx steering using TAPRIO or mqprio Qdisc or VLAN egress
> mappings.
>
> However, that's only implemented for Layer 2 transport. Extend this for UDPv4
> and UDPv6 transports. Update the man page accordingly.
It makes sense to me.
> @@ -196,6 +196,19 @@ static int udp_open(struct transport *t, struct
> interface *iface,
> pr_warning("Failed to set general DSCP priority.");
> }
>
> + socket_priority = config_get_int(t->cfg, "global", "socket_priority");
> +
> + if (socket_priority &&
> + setsockopt(efd, SOL_SOCKET, SO_PRIORITY, &socket_priority,
> + sizeof(socket_priority))) {
> + pr_warning("Failed to set event socket priority.");
> + }
> + if (socket_priority &&
> + setsockopt(gfd, SOL_SOCKET, SO_PRIORITY, &socket_priority,
> + sizeof(socket_priority))) {
> + pr_warning("Failed to set general socket priority.");
Is it useful to set the priority for non-event messages? Their timing
is not so important and there can be a lot of traffic generated
remotely (e.g. management messages).
--
Miroslav Lichvar
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel