mbox series

[bpf-next,0/3] xsk: TX metadata launch time support

Message ID 20231130162028.852006-1-yoong.siang.song@intel.com
Headers show
Series xsk: TX metadata launch time support | expand

Message

Song, Yoong Siang Nov. 30, 2023, 4:20 p.m. UTC
This series expands XDP TX metadata framework to include HW launch time offload.

Song Yoong Siang (3):
  xsk: add launch time support to XDP Tx metadata
  net: stmmac: Add launch time support to XDP ZC
  selftests/bpf: Add launch time to xdp_hw_metadata

 Documentation/netlink/specs/netdev.yaml        |  4 ++++
 Documentation/networking/xsk-tx-metadata.rst   |  5 +++++
 drivers/net/ethernet/stmicro/stmmac/stmmac.h   |  2 ++
 .../net/ethernet/stmicro/stmmac/stmmac_main.c  | 13 +++++++++++++
 include/net/xdp_sock.h                         | 10 ++++++++++
 include/net/xdp_sock_drv.h                     |  1 +
 include/uapi/linux/if_xdp.h                    |  9 +++++++++
 include/uapi/linux/netdev.h                    |  3 +++
 net/core/netdev-genl.c                         |  2 ++
 net/xdp/xsk.c                                  |  3 +++
 tools/include/uapi/linux/if_xdp.h              |  9 +++++++++
 tools/include/uapi/linux/netdev.h              |  3 +++
 tools/net/ynl/generated/netdev-user.c          |  1 +
 tools/testing/selftests/bpf/xdp_hw_metadata.c  | 18 +++++++++++++++++-
 14 files changed, 82 insertions(+), 1 deletion(-)

Comments

Song, Yoong Siang Dec. 1, 2023, 12:02 a.m. UTC | #1
On Friday, December 1, 2023 4:29 AM, Willem de Bruijn wrote:
>Song Yoong Siang wrote:
>> This patch extends the XDP Tx metadata framework to include Time-Based
>> Scheduling (TBS) support where the NIC will schedule a packet for
>> transmission at a pre-determined time called launch time. The value of
>> launch time is communicated from user space to Ethernet driver via
>> launch_time field of struct xsk_tx_metadata.
>>
>> Suggested-by: Stanislav Fomichev <sdf@google.com>
>> Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
>> ---
>>  Documentation/netlink/specs/netdev.yaml      |  4 ++++
>>  Documentation/networking/xsk-tx-metadata.rst |  5 +++++
>>  include/net/xdp_sock.h                       | 10 ++++++++++
>>  include/net/xdp_sock_drv.h                   |  1 +
>>  include/uapi/linux/if_xdp.h                  |  9 +++++++++
>>  include/uapi/linux/netdev.h                  |  3 +++
>>  net/core/netdev-genl.c                       |  2 ++
>>  net/xdp/xsk.c                                |  3 +++
>>  tools/include/uapi/linux/if_xdp.h            |  9 +++++++++
>>  tools/include/uapi/linux/netdev.h            |  3 +++
>>  tools/net/ynl/generated/netdev-user.c        |  1 +
>>  11 files changed, 50 insertions(+)
>>
>> diff --git a/Documentation/netlink/specs/netdev.yaml
>b/Documentation/netlink/specs/netdev.yaml
>> index 00439bcbd2e3..a602776bbfb4 100644
>> --- a/Documentation/netlink/specs/netdev.yaml
>> +++ b/Documentation/netlink/specs/netdev.yaml
>> @@ -66,6 +66,10 @@ definitions:
>>          name: tx-checksum
>>          doc:
>>            L3 checksum HW offload is supported by the driver.
>> +      -
>> +        name: launch-time
>> +        doc:
>> +          HW Time-Based Scheduling (TBS) is supported by the driver.
>
>Can we avoid introducing another term? We already have too many:
>launchtime, earliest delivery time (EDT), SO_TXTIME,
>pacing offload, earliest txtime first (ETF).
>

Sure. I will change TBS to ETF in my V2 so that it is aligned with etf command in tc application.
Jakub Kicinski Dec. 2, 2023, 3:28 a.m. UTC | #2
On Fri,  1 Dec 2023 00:20:26 +0800 Song Yoong Siang wrote:
> +        name: launch-time
> +        doc:
> +          HW Time-Based Scheduling (TBS) is supported by the driver.

Does this mean fifo "gating" or HW can do reordering?
Song, Yoong Siang Dec. 3, 2023, 8:58 a.m. UTC | #3
On Saturday, December 2, 2023 11:29 AM, Jakub Kicinski wrote:
>On Fri,  1 Dec 2023 00:20:26 +0800 Song Yoong Siang wrote:
>> +        name: launch-time
>> +        doc:
>> +          HW Time-Based Scheduling (TBS) is supported by the driver.
>
>Does this mean fifo "gating" or HW can do reordering?

Yes, HW will do reordering according to the value of launch time.