Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try using latest xdp #4652

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
[submodule "submodules/xdp-for-windows"]
path = submodules/xdp-for-windows
url = https://github.com/microsoft/xdp-for-windows.git
branch = release/1.0
branch = 300d18c43f989ca22ad1be2f2836e2bbec6a2c4f
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtfriesen what are your thoughts on a timeline for a new release branch (not necessarily an official release) from XDP?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure I understand the distinction - XDP should have a release branch 1:1 with each major/minor version. Are you asking if we can do an unsupported/unsigned release for 1.x, and then either make it "official" later, or let 1.y become officially supported afterwards?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not asking for a one-off. I'm asking: when should we fork the next XDP release branch?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whenever needed by a dependent project. XDP keeps main in a releasable state at all times.

8 changes: 8 additions & 0 deletions scripts/prepare-machine.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,17 @@ function Install-SigningCertificates {
# NB: XDP can be uninstalled via Uninstall-Xdp
function Install-Xdp-Driver {
if (!$IsWindows) { return } # Windows only
# Install VCRT. Not required for official XDP builds.
Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "vc_redist.x64.exe"
Start-Process -FilePath "vc_redist.x64.exe" -ArgumentList "/install /quiet /norestart" -Wait -NoNewWindow

Write-Host "Downloading XDP msi"
$MsiPath = Join-Path $ArtifactsPath "xdp.msi"
Invoke-WebRequest -Uri (Get-Content (Join-Path $PSScriptRoot "xdp.json") | ConvertFrom-Json).installer -OutFile $MsiPath
$CertFileName = 'xdp.cer'
Get-AuthenticodeSignature $MsiPath | Select-Object -ExpandProperty SignerCertificate | Export-Certificate -Type CERT -FilePath $CertFileName
Import-Certificate -FilePath $CertFileName -CertStoreLocation 'cert:\localmachine\root'
Import-Certificate -FilePath $CertFileName -CertStoreLocation 'cert:\localmachine\trustedpublisher'
Write-Host "Installing XDP driver"
msiexec.exe /i $MsiPath /quiet | Out-Null
}
Expand Down
8 changes: 8 additions & 0 deletions scripts/quic_callback.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,18 @@ if ($Command.Contains("/home/secnetperf/_work/quic/artifacts/bin/linux/x64_Relea
./artifacts/bin/windows/x64_Release_schannel/secnetperf -exec:$mode -io:$io -stats:$stats
} elseif ($Command.Contains("Install_XDP")) {
Write-Host "Executing command: Install_XDP"
# Install VCRT. Not required for official XDP builds.
Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "vc_redist.x64.exe"
Start-Process -FilePath "vc_redist.x64.exe" -ArgumentList "/install /quiet /norestart" -Wait -NoNewWindow

Write-Host "(SERVER) Downloading XDP installer"
$installerUri = $Command.Split(";")[1]
$msiPath = Repo-Path "xdp.msi"
Invoke-WebRequest -Uri $installerUri -OutFile $msiPath -UseBasicParsing
$CertFileName = 'xdp.cer'
Get-AuthenticodeSignature $msiPath | Select-Object -ExpandProperty SignerCertificate | Export-Certificate -Type CERT -FilePath $CertFileName
Import-Certificate -FilePath $CertFileName -CertStoreLocation 'cert:\localmachine\root'
Import-Certificate -FilePath $CertFileName -CertStoreLocation 'cert:\localmachine\trustedpublisher'
Write-Host "(SERVER) Installing XDP. Msi path: $msiPath"
msiexec.exe /i $msiPath /quiet | Out-Host
Wait-DriverStarted "xdp" 10000
Expand Down
16 changes: 16 additions & 0 deletions scripts/secnetperf-helpers.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,19 @@ function Wait-DriverStarted {
# Download and install XDP on both local and remote machines.
function Install-XDP {
param ($Session, $RemoteDir)
# Install VCRT. Not required for official XDP builds.
Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "vc_redist.x64.exe"
Start-Process -FilePath "vc_redist.x64.exe" -ArgumentList "/install /quiet /norestart" -Wait -NoNewWindow

$installerUri = (Get-Content (Join-Path $PSScriptRoot "xdp.json") | ConvertFrom-Json).installer
$msiPath = Repo-Path "artifacts/xdp.msi"
Write-Host "Downloading XDP installer"
whoami
Invoke-WebRequest -Uri $installerUri -OutFile $msiPath -UseBasicParsing
$CertFileName = 'xdp.cer'
Get-AuthenticodeSignature $msiPath | Select-Object -ExpandProperty SignerCertificate | Export-Certificate -Type CERT -FilePath $CertFileName
Import-Certificate -FilePath $CertFileName -CertStoreLocation 'cert:\localmachine\root'
Import-Certificate -FilePath $CertFileName -CertStoreLocation 'cert:\localmachine\trustedpublisher'
Write-Host "Installing XDP driver locally"
msiexec.exe /i $msiPath /quiet | Out-Null
$Size = Get-FileHash $msiPath
Expand All @@ -157,6 +165,14 @@ function Install-XDP {
Copy-Item -ToSession $Session $msiPath -Destination $remoteMsiPath
$WaitDriverStartedStr = "${function:Wait-DriverStarted}"
Invoke-Command -Session $Session -ScriptBlock {
# Install VCRT. Not required for official XDP builds.
Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "vc_redist.x64.exe"
Start-Process -FilePath "vc_redist.x64.exe" -ArgumentList "/install /quiet /norestart" -Wait -NoNewWindow

$CertFileName = 'xdp.cer'
Get-AuthenticodeSignature $Using:remoteMsiPath | Select-Object -ExpandProperty SignerCertificate | Export-Certificate -Type CERT -FilePath $CertFileName
Import-Certificate -FilePath $CertFileName -CertStoreLocation 'cert:\localmachine\root'
Import-Certificate -FilePath $CertFileName -CertStoreLocation 'cert:\localmachine\trustedpublisher'
msiexec.exe /i $Using:remoteMsiPath /quiet | Out-Host
$WaitDriverStarted = [scriptblock]::Create($Using:WaitDriverStartedStr)
& $WaitDriverStarted xdp 10000
Expand Down
2 changes: 1 addition & 1 deletion scripts/xdp.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"installer": "https://github.com/microsoft/xdp-for-windows/releases/download/v1.0.1/xdp-for-windows.1.0.1.msi"
"installer": "https://github.com/microsoft/xdp-for-windows/releases/download/v1.1.0%2B2886c03f/xdp-for-windows.x64.1.1.0.msi"
}
40 changes: 20 additions & 20 deletions src/generated/linux/datapath_raw_xdp_win.c.clog.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,26 +71,6 @@ tracepoint(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpInterfaceQueues , arg2, arg3);\



/*----------------------------------------------------------
// Decoder Ring for XdpInitialize
// [ xdp][%p] XDP initialized, %u procs
// QuicTraceLogVerbose(
XdpInitialize,
"[ xdp][%p] XDP initialized, %u procs",
Xdp,
Xdp->PartitionCount);
// arg2 = arg2 = Xdp = arg2
// arg3 = arg3 = Xdp->PartitionCount = arg3
----------------------------------------------------------*/
#ifndef _clog_4_ARGS_TRACE_XdpInitialize
#define _clog_4_ARGS_TRACE_XdpInitialize(uniqueId, encoded_arg_string, arg2, arg3)\
tracepoint(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpInitialize , arg2, arg3);\

#endif




/*----------------------------------------------------------
// Decoder Ring for XdpInterfaceInitialize
// [ixdp][%p] Initializing interface %u
Expand Down Expand Up @@ -151,6 +131,26 @@ tracepoint(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpWorkerStart , arg2, arg3);\



/*----------------------------------------------------------
// Decoder Ring for XdpInitialize
// [ xdp][%p] XDP initialized, %u procs
// QuicTraceLogVerbose(
XdpInitialize,
"[ xdp][%p] XDP initialized, %u procs",
Xdp,
Xdp->PartitionCount);
// arg2 = arg2 = Xdp = arg2
// arg3 = arg3 = Xdp->PartitionCount = arg3
----------------------------------------------------------*/
#ifndef _clog_4_ARGS_TRACE_XdpInitialize
#define _clog_4_ARGS_TRACE_XdpInitialize(uniqueId, encoded_arg_string, arg2, arg3)\
tracepoint(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpInitialize , arg2, arg3);\

#endif




/*----------------------------------------------------------
// Decoder Ring for XdpRelease
// [ xdp][%p] XDP release
Expand Down
46 changes: 23 additions & 23 deletions src/generated/linux/datapath_raw_xdp_win.c.clog.h.lttng.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,29 +51,6 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpInterfaceQueues,



/*----------------------------------------------------------
// Decoder Ring for XdpInitialize
// [ xdp][%p] XDP initialized, %u procs
// QuicTraceLogVerbose(
XdpInitialize,
"[ xdp][%p] XDP initialized, %u procs",
Xdp,
Xdp->PartitionCount);
// arg2 = arg2 = Xdp = arg2
// arg3 = arg3 = Xdp->PartitionCount = arg3
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpInitialize,
TP_ARGS(
const void *, arg2,
unsigned int, arg3),
TP_FIELDS(
ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2)
ctf_integer(unsigned int, arg3, arg3)
)
)



/*----------------------------------------------------------
// Decoder Ring for XdpInterfaceInitialize
// [ixdp][%p] Initializing interface %u
Expand Down Expand Up @@ -143,6 +120,29 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpWorkerStart,



/*----------------------------------------------------------
// Decoder Ring for XdpInitialize
// [ xdp][%p] XDP initialized, %u procs
// QuicTraceLogVerbose(
XdpInitialize,
"[ xdp][%p] XDP initialized, %u procs",
Xdp,
Xdp->PartitionCount);
// arg2 = arg2 = Xdp = arg2
// arg3 = arg3 = Xdp->PartitionCount = arg3
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_DATAPATH_RAW_XDP_WIN_C, XdpInitialize,
TP_ARGS(
const void *, arg2,
unsigned int, arg3),
TP_FIELDS(
ctf_integer_hex(uint64_t, arg2, (uint64_t)arg2)
ctf_integer(unsigned int, arg3, arg3)
)
)



/*----------------------------------------------------------
// Decoder Ring for XdpRelease
// [ xdp][%p] XDP release
Expand Down
1 change: 1 addition & 0 deletions src/inc/msquic_winuser.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
#define QUIC_STATUS_INVALID_STATE E_NOT_VALID_STATE // 0x8007139f
#define QUIC_STATUS_NOT_SUPPORTED E_NOINTERFACE // 0x80004002
#define QUIC_STATUS_NOT_FOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND) // 0x80070490
#define QUIC_STATUS_FILE_NOT_FOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) // 0x80070002
#define QUIC_STATUS_BUFFER_TOO_SMALL E_NOT_SUFFICIENT_BUFFER // 0x8007007a
#define QUIC_STATUS_HANDSHAKE_FAILURE ERROR_QUIC_HANDSHAKE_FAILURE // 0x80410000
#define QUIC_STATUS_ABORTED E_ABORT // 0x80004004
Expand Down
Loading
Loading