)]}'
{
  "commit": "8ee8f5426b95c505f682a0d742d5aa5e85cbc3bc",
  "tree": "d30abfc463367294eae18e7a2e58f38d8071bd92",
  "parents": [
    "7a1eb6afe95a67f9d2be8ef75d74dfbfd0673672"
  ],
  "author": {
    "name": "Jacob Keller",
    "email": "jacob.e.keller@intel.com",
    "time": "Wed Nov 18 16:30:59 2026 -0800"
  },
  "committer": {
    "name": "Tony Nguyen",
    "email": "anthony.l.nguyen@intel.com",
    "time": "Mon Nov 30 16:33:01 2026 -0800"
  },
  "message": "ice: fix computation of ETF timestamps for E830\n\nWhen Earliest TxTime First offload is enabled, the ice_tx_map() function\ncomputes the appropriate timestamps for the timestamp ring used to set the\ntransmit times for each packet.\n\nIt computes this by converting the skb-\u003etstamp into a timespec and then\ntaking the sub-second portion from tv_nsec and dividing it by the timestamp\nresolution. This value is then inserted into the timestamp descriptor using\nice_build_tstamp_desc().\n\nAt first glance this may seem reasonable. After all, the Tx timestamp\ndescriptor field has a mask defined by ICE_TXTIME_STAMP_M which is\nGENMASK(31,13). This is a 19-bit wide field. With a unit size of 128\nnanoseconds, the maximum representable time is only ~67 milliseconds, far\nbelow the size of the tv_nsec field (just shy of one second).\n\nThe E830 device time is represented as a single 64-bit nanosecond value as\nseen by ice_ptp_read_src_clk_reg() using a simple rd64 on the GLTSYN_TIME_L\nregister.\n\nAccording to the data sheet, the hardware uses the following flow to\ndetermine when to transmit the next packet in the paced queue:\n\n  half_window \u003d window_size / 2\n  if (ts \u003c\u003d timer) {\n    if (timer - ts \u003c half_window) {\n      // timestamp expired\n      pass\n    } else {\n      // wait before sending\n      stall\n    }\n  } else {\n    // Handle possible rollover case\n    if (ts - timer \u003c half_window) {\n      // wait before sending\n      stall\n    } else {\n      // timestamp expired\n      pass\n    }\n  }\n\nHere, window_size is the maximum value that fix in the 19 bit sized\ntimestamp field, ts is the next packet timestamp waiting in the queue, and\ntimer is the 19 bits of the GLTSYN_TIME MAC timer. The configured timestamp\n\"resolution\" determines at which bit position to capture from the\nGLTSYN_TIME registers. This logic does not perform any computation to\ndivide out seconds or to handle anything like a timespec. The timestamp and\ntimer values are compared directly with logic to account for handling\nrollover.\n\nBecause of the faulty logic, all of the timestamps computed and placed in\nthe ring will result in the transmit time not matching the desired time per\nthe skb. Consider a timestamp exactly on a second boundary. The computed\ntimestamp will be 0, while the actual value should be (1,000,000,000 / 128)\nmod 2^19 or 472,468 (0x73594).\n\nFix this by directly converting the ktime to nanoseconds rather than\nconverting to a timespec64.\n\nFixes: ccde82e90946 (\"ice: add E830 Earliest TxTime First Offload support\")\nSigned-off-by: Jacob Keller \u003cjacob.e.keller@intel.com\u003e\nReviewed-by: Aleksandr Loktionov \u003caleksandr.loktionov@intel.com\u003e\nSigned-off-by: Tony Nguyen \u003canthony.l.nguyen@intel.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "35a480a1e1726669273329b2016fdcf52d6444a6",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/intel/ice/ice_txrx.c",
      "new_id": "ca98394caa04766f8fce77290b0c7edb19b6e593",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/intel/ice/ice_txrx.c"
    }
  ]
}
