From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE9B1C10F14 for ; Tue, 23 Apr 2019 08:31:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB04120645 for ; Tue, 23 Apr 2019 08:31:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726503AbfDWIb6 (ORCPT ); Tue, 23 Apr 2019 04:31:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55040 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725939AbfDWIb6 (ORCPT ); Tue, 23 Apr 2019 04:31:58 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B401C057F3D; Tue, 23 Apr 2019 08:31:58 +0000 (UTC) Received: from localhost (holly.tpb.lab.eng.brq.redhat.com [10.43.134.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 47E731001DDC; Tue, 23 Apr 2019 08:31:56 +0000 (UTC) Date: Tue, 23 Apr 2019 10:31:41 +0200 From: Miroslav Lichvar To: Hangbin Liu Cc: Richard Cochran , Jiri Benc , netdev@vger.kernel.org, David Miller , Patrick McHardy , stefan.sorensen@spectralink.com Subject: Re: [PATCH net-next] macvlan: pass get_ts_info and SIOC[SG]HWTSTAMP ioctl to real device Message-ID: <20190423083141.GA5188@localhost> References: <20190320022333.3378-1-liuhangbin@gmail.com> <20190417061452.GA18865@dhcp-12-139.nay.redhat.com> <20190417154306.om6rjkxq4hikhsht@localhost> <20190417205958.6508bda2@redhat.com> <20190418033157.irs25halxnemh65y@localhost> <20190418080509.GD5984@localhost> <20190423041817.GE18865@dhcp-12-139.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190423041817.GE18865@dhcp-12-139.nay.redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 23 Apr 2019 08:31:58 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Apr 23, 2019 at 12:18:17PM +0800, Hangbin Liu wrote: > On Thu, Apr 18, 2019 at 10:05:09AM +0200, Miroslav Lichvar wrote: > > select a more general filter. A container could run a PTP clock if it > > Do you have an idea about how to select a general filter? If we have enabled > HWTSTAMP_FILTER_PTP_V2_L4_SYNC on host and a user in container want to enable > HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ, then which one is more general? In this case neither is a more general filter of the other. If V2_L4_SYNC is already selected, only the following filters could be selected on the macvlan interface: HWTSTAMP_FILTER_PTP_V2_L4_SYNC, HWTSTAMP_FILTER_PTP_V2_L4_EVENT, HWTSTAMP_FILTER_PTP_V2_SYNC, HWTSTAMP_FILTER_PTP_V2_EVENT, HWTSTAMP_FILTER_ALL, I think one way to check this would be to assign each filter a (16-bit?) value where the individual bits correspond to the message types and the newly selected filter would have to contain all bits of the old one. > > If I understand it correctly, even without this ioctl a container can > > prevent the host or other containers from getting some of the HW > > timestamps by requesting TX timestamps at a high rate. I suspect the > > Could traffic sharping/limitation fix it? Yes, but it has to be specific to packets with TX timestamp requested. >From what I have seen, TX timestamping may start to fail at just few tens of thousands of packets per second. -- Miroslav Lichvar