From owner-freebsd-net@freebsd.org Thu Jun 11 15:51:58 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF8BD3376B9 for ; Thu, 11 Jun 2020 15:51:58 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49jSz15zFYz3gXb for ; Thu, 11 Jun 2020 15:51:57 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: by mail-ej1-x633.google.com with SMTP id n24so7006159ejd.0 for ; Thu, 11 Jun 2020 08:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2XbpI/aGzrK3sHRZvPdNLLsUp1JQ9vPx+UhMthMfBgE=; b=rrOx7JXcwNa6Ku0ekVxfty0HfXHkxD0PU7Pr8QP/wQuD/LyOqR6BiKHmxEgGfKN0QM 87SZ2u54TP3UJ3LAlPOspxzDEpi4SJJRWy+8R3KUWlpU8/9x5fKGmjkHwDBCRxIf2jPk eaeqemEI165HeXES3Fzyc7bAeYhBQEUMC8xtq8NnkeuziwwJSKPatfjuDksDEbsyxLZm peXwY1tX+LVW+ToeNBd0cHJRlFrMPnhA+diSoIm5d9Poxt3DKEoXHnZ1dkG6sdW/uWwd rR0v7BBob4sbkZBnNPq1Cc9i79MkfrrTOlbGQLKSHOqrBt46PACHQcWsbBwh/ynHLGNx jxLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2XbpI/aGzrK3sHRZvPdNLLsUp1JQ9vPx+UhMthMfBgE=; b=UYrInagKfVQhLj3Unl2iIIhbzDPhFjCQI1JGDLpu0eNatGrTEhmphGI29IvFYm8YfS hCpgGHINlgYenLJFH8vOr4NeUZifx1QJwfDPb5zHgGQuZqDrKoFg23dQJdv+ie9eiygR COA7zBWhPFcrF04yKlciBDdPTVpL9vpp4tynFSS4ays5DeWgrZbeTgUlOaExVAzwdSXX BxDIqVHx2VbFmL1TvxXXfP4/n8/y018fZTDF2uYm5Lz2bDZ74Zd7Lc19fWh4q0IDBCLU rRg1AObRNIGJQkq/DTo5h+Fxbm8Cka3ipjGour3jX0pG8SFrt+qL6cQxW3zmzjhbKJhp XWgw== X-Gm-Message-State: AOAM531rVcdB9M17f55ALUasMY4vTab1kLXAtFiImhtscop+iYMenDqK bNr2LX6t62+b3CxtkG6LBVkKkt8nYrc843PRj+s= X-Google-Smtp-Source: ABdhPJyhoueeHPL4MMmSgB91cBTf6fEEjCrFFxMjHd7bJV937Vy6riDIY/Wqxj8hW//5Quu3UqpKZrGn6iUFUkW8Xlg= X-Received: by 2002:a17:907:abb:: with SMTP id bz27mr2954414ejc.170.1591890715904; Thu, 11 Jun 2020 08:51:55 -0700 (PDT) MIME-Version: 1.0 References: <798afa552a794a0f9c07aa2fca422ea3@dlr.de> <20200602115343.GO48478@kib.kiev.ua> In-Reply-To: <20200602115343.GO48478@kib.kiev.ua> From: Eric Joyner Date: Thu, 11 Jun 2020 08:51:19 -0700 Message-ID: Subject: Re: HW timestamping e1000 To: Konstantin Belousov Cc: Gabriel.Moyano@dlr.de, freebsd-net@freebsd.org X-Rspamd-Queue-Id: 49jSz15zFYz3gXb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=rrOx7JXc; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ricera10@gmail.com designates 2a00:1450:4864:20::633 as permitted sender) smtp.mailfrom=ricera10@gmail.com X-Spamd-Result: default: False [-4.01 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.019]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; NEURAL_HAM_LONG(-0.99)[-0.994]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::633:from]; NEURAL_HAM_SHORT(-1.00)[-1.001]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2020 15:51:58 -0000 Like Konstantin said, it might only be possible on some e1000 cards. Could you tell me which card you're using? If the device name shows up as igb, then it's likely it does support it. That said, I'm not an expert on HW timestamping, so I'm not sure what features are supported or how well they're implemented. I can try forwarding some of your questions to someone who knows more about it at Intel, if you have any. - Eric On Tue, Jun 2, 2020 at 4:54 AM Konstantin Belousov wrote: > On Tue, Jun 02, 2020 at 10:46:00AM +0000, Gabriel.Moyano@dlr.de wrote: > > Hi everybody, > > > > Currently I am writing a piece of code to test HW timestamping on e1000 > during reception, which runs on FreeBSD 12, but unfortunately it seems that > it isn't working. > > > > The socket is created and configured as follows: > > > > sockfd = socket(AF_INET, SOCK_DGRAM, 0); > > int on = 1; > > setsockopt(sockfd, SOL_SOCKET, SO_TIMESTAMP, &on, sizeof(on)); > > > > After recvmsg() is called, cmsg_type of received control messages are > printed out with help of the control message routines ( > https://www.freebsd.org/cgi/man.cgi?query=CMSG_DATA). SCM_TIME_INFO > should be printed out but it's not. > > > > Is there any configuration missing? Does e1000 support HW timestamping > right? > > > > I will appreciate any help. > > Hardware timestamping is only implemented for Mellanox ConnectX-4 and hier, > and Chelsio Terminators (T4 and newer ?). It might be doable for Intel > some cards, but not all of them. > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >