On Tue, Aug 30, 2022 at 12:43:24PM +0200, Erez wrote:
> On Tue, 30 Aug 2022 at 12:28, Miroslav Lichvar <mlich...@redhat.com> wrote:
> 
> > 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).
> >
> 
> As I understand, the traffic is low.
> Anyway, as it is a socket option.
> You would need an additional socket.
> Is it really worth having multiple sockets?

There already are two sockets. One for event messages and another for
everything else. A (multicast) PTP server sends event messages at a
constant rate. The rate of other messages depends on the number of
clients and rate of their requests.

-- 
Miroslav Lichvar



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to