[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH 37/40] igb: Implement Tx timestamp
From: |
Sriram Yagnaraman |
Subject: |
RE: [PATCH 37/40] igb: Implement Tx timestamp |
Date: |
Sat, 15 Apr 2023 20:13:03 +0000 |
> -----Original Message-----
> From: Akihiko Odaki <akihiko.odaki@daynix.com>
> Sent: Friday, 14 April 2023 13:38
> Cc: Sriram Yagnaraman <sriram.yagnaraman@est.tech>; Jason Wang
> <jasowang@redhat.com>; Dmitry Fleytman <dmitry.fleytman@gmail.com>;
> Michael S. Tsirkin <mst@redhat.com>; Alex Bennée <alex.bennee@linaro.org>;
> Philippe Mathieu-Daudé <philmd@linaro.org>; Thomas Huth
> <thuth@redhat.com>; Wainer dos Santos Moschetta
> <wainersm@redhat.com>; Beraldo Leal <bleal@redhat.com>; Cleber Rosa
> <crosa@redhat.com>; Laurent Vivier <lvivier@redhat.com>; Paolo Bonzini
> <pbonzini@redhat.com>; qemu-devel@nongnu.org; Akihiko Odaki
> <akihiko.odaki@daynix.com>
> Subject: [PATCH 37/40] igb: Implement Tx timestamp
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
> hw/net/igb_core.c | 7 +++++++
> hw/net/igb_regs.h | 3 +++
> 2 files changed, 10 insertions(+)
>
> diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index
> c716f400fd..38b53676d4 100644
> --- a/hw/net/igb_core.c
> +++ b/hw/net/igb_core.c
> @@ -614,6 +614,13 @@ igb_process_tx_desc(IGBCore *core,
> tx->first_olinfo_status =
> le32_to_cpu(tx_desc->read.olinfo_status);
> tx->first = false;
> }
> +
> + if ((cmd_type_len & E1000_ADVTXD_MAC_TSTAMP) &&
Should ^ be tx->first_cmd_type_len?
Otherwise, Reviewed-by: Sriram Yagnaraman <sriram.yagnaraman@est.tech>
> + (core->mac[TSYNCTXCTL] & E1000_TSYNCTXCTL_ENABLED) &&
> + !(core->mac[TSYNCTXCTL] & E1000_TSYNCTXCTL_VALID)) {
> + core->mac[TSYNCTXCTL] |= E1000_TSYNCTXCTL_VALID;
> + e1000x_timestamp(core->mac, core->timadj, TXSTMPL, TXSTMPH);
> + }
> } else if ((cmd_type_len & E1000_ADVTXD_DTYP_CTXT) ==
> E1000_ADVTXD_DTYP_CTXT) {
> /* advanced transmit context descriptor */ diff --git
> a/hw/net/igb_regs.h b/hw/net/igb_regs.h index b88dc9f1f1..808b587a36
> 100644
> --- a/hw/net/igb_regs.h
> +++ b/hw/net/igb_regs.h
> @@ -322,6 +322,9 @@ union e1000_adv_rx_desc {
> /* E1000_EITR_CNT_IGNR is only for 82576 and newer */
> #define E1000_EITR_CNT_IGNR 0x80000000 /* Don't reset counters on
> write */
>
> +#define E1000_TSYNCTXCTL_VALID 0x00000001 /* tx timestamp valid */
> +#define E1000_TSYNCTXCTL_ENABLED 0x00000010 /* enable tx
> timestampping
> +*/
> +
> /* PCI Express Control */
> #define E1000_GCR_CMPL_TMOUT_MASK 0x0000F000
> #define E1000_GCR_CMPL_TMOUT_10ms 0x00001000
> --
> 2.40.0
- [PATCH 27/40] hw/net/net_rx_pkt: Enforce alignment for eth_header, (continued)
- [PATCH 27/40] hw/net/net_rx_pkt: Enforce alignment for eth_header, Akihiko Odaki, 2023/04/14
- [PATCH 29/40] igb: Implement MSI-X single vector mode, Akihiko Odaki, 2023/04/14
- [PATCH 30/40] igb: Implement igb-specific oversize check, Akihiko Odaki, 2023/04/14
- [PATCH 31/40] igb: Use UDP for RSS hash, Akihiko Odaki, 2023/04/14
- [PATCH 38/40] vmxnet3: Do not depend on PC, Akihiko Odaki, 2023/04/14
- [PATCH 37/40] igb: Implement Tx timestamp, Akihiko Odaki, 2023/04/14
- RE: [PATCH 37/40] igb: Implement Tx timestamp,
Sriram Yagnaraman <=
- [PATCH 33/40] igb: Implement Tx SCTP CSO, Akihiko Odaki, 2023/04/14
- [PATCH 39/40] MAINTAINERS: Add a reviewer for network packet abstractions, Akihiko Odaki, 2023/04/14
- [PATCH 34/40] igb: Strip the second VLAN tag for extended VLAN, Akihiko Odaki, 2023/04/14
- [PATCH 40/40] docs/system/devices/igb: Note igb is tested for DPDK, Akihiko Odaki, 2023/04/14
- [PATCH 36/40] igb: Implement Rx PTP2 timestamp, Akihiko Odaki, 2023/04/14
- [PATCH 32/40] igb: Implement Rx SCTP CSO, Akihiko Odaki, 2023/04/14
- [PATCH 35/40] igb: Filter with the second VLAN tag for extended VLAN, Akihiko Odaki, 2023/04/14