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

Improve SAL for RSS APIs #417

Merged
merged 2 commits into from
Dec 2, 2023
Merged
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
4 changes: 2 additions & 2 deletions published/external/xdpapi_experimental.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ typedef
HRESULT
XDP_RSS_GET_CAPABILITIES_FN(
_In_ HANDLE InterfaceHandle,
_Out_opt_ XDP_RSS_CAPABILITIES *RssCapabilities,
_Out_writes_bytes_opt_(*RssCapabilitiesSize) XDP_RSS_CAPABILITIES *RssCapabilities,
_Inout_ UINT32 *RssCapabilitiesSize
);

Expand Down Expand Up @@ -213,7 +213,7 @@ typedef
HRESULT
XDP_RSS_GET_FN(
_In_ HANDLE InterfaceHandle,
_Out_opt_ XDP_RSS_CONFIGURATION *RssConfiguration,
_Out_writes_bytes_opt_(*RssConfigurationSize) XDP_RSS_CONFIGURATION *RssConfiguration,
_Inout_ UINT32 *RssConfigurationSize
);

Expand Down
4 changes: 2 additions & 2 deletions src/xdpapi/xdpapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ XdpInterfaceOpen(
HRESULT
XdpRssGetCapabilities(
_In_ HANDLE InterfaceHandle,
_Out_opt_ XDP_RSS_CAPABILITIES *RssCapabilities,
_Out_writes_bytes_opt_(*RssCapabilitiesSize) XDP_RSS_CAPABILITIES *RssCapabilities,
_Inout_ UINT32 *RssCapabilitiesSize
)
{
Expand Down Expand Up @@ -210,7 +210,7 @@ XdpRssSet(
HRESULT
XdpRssGet(
_In_ HANDLE InterfaceHandle,
_Out_opt_ XDP_RSS_CONFIGURATION *RssConfiguration,
_Out_writes_bytes_opt_(*RssConfigurationSize) XDP_RSS_CONFIGURATION *RssConfiguration,
_Inout_ UINT32 *RssConfigurationSize
)
{
Expand Down
3 changes: 1 addition & 2 deletions test/rssconfig/rssconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ ProcessCommandGet(

RssConfigSize = 0;
Result = XdpRssGet(InterfaceHandle, RssConfig, &RssConfigSize);
if (SUCCEEDED(Result) || RssConfigSize < sizeof(*RssConfig)) {
if (SUCCEEDED(Result)) {
printf(
"Error: Failed to get RSS configuration size on IfIndex=%u Result=%d RssConfigSize=%d\n",
IfIndex, Result, RssConfigSize);
Expand All @@ -215,7 +215,6 @@ ProcessCommandGet(
goto Exit;
}

_Analysis_assume_(RssConfigSize >= sizeof(*RssConfig));
Result = XdpRssGet(InterfaceHandle, RssConfig, &RssConfigSize);
if (FAILED(Result)) {
printf("Error: Failed to get RSS configuration on IfIndex=%u Result=%d\n", IfIndex, Result);
Expand Down
Loading