Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ice/ice_ddp_common.c
/* SPDX-License-Identifier: BSD-3-Clause */ | /* SPDX-License-Identifier: BSD-3-Clause */ | ||||
/* Copyright (c) 2022, Intel Corporation | /* Copyright (c) 2023, Intel Corporation | ||||
* All rights reserved. | * All rights reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
* modification, are permitted provided that the following conditions are met: | * modification, are permitted provided that the following conditions are met: | ||||
* | * | ||||
* 1. Redistributions of source code must retain the above copyright notice, | * 1. Redistributions of source code must retain the above copyright notice, | ||||
* this list of conditions and the following disclaimer. | * this list of conditions and the following disclaimer. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 1,454 Lines • ▼ Show 20 Lines | if (!bld) | ||||
return NULL; | return NULL; | ||||
buf = (struct ice_buf_hdr *)bld; | buf = (struct ice_buf_hdr *)bld; | ||||
buf->data_end = CPU_TO_LE16(offsetof(struct ice_buf_hdr, | buf->data_end = CPU_TO_LE16(offsetof(struct ice_buf_hdr, | ||||
section_entry)); | section_entry)); | ||||
return bld; | return bld; | ||||
} | } | ||||
static bool ice_is_gtp_u_profile(u16 prof_idx) | static bool ice_is_gtp_u_profile(u32 prof_idx) | ||||
{ | { | ||||
return (prof_idx >= ICE_PROFID_IPV6_GTPU_TEID && | return (prof_idx >= ICE_PROFID_IPV6_GTPU_TEID && | ||||
prof_idx <= ICE_PROFID_IPV6_GTPU_IPV6_TCP) || | prof_idx <= ICE_PROFID_IPV6_GTPU_IPV6_TCP) || | ||||
prof_idx == ICE_PROFID_IPV4_GTPU_TEID; | prof_idx == ICE_PROFID_IPV4_GTPU_TEID; | ||||
} | } | ||||
static bool ice_is_gtp_c_profile(u16 prof_idx) | static bool ice_is_gtp_c_profile(u32 prof_idx) | ||||
{ | { | ||||
switch (prof_idx) { | switch (prof_idx) { | ||||
case ICE_PROFID_IPV4_GTPC_TEID: | case ICE_PROFID_IPV4_GTPC_TEID: | ||||
case ICE_PROFID_IPV4_GTPC_NO_TEID: | case ICE_PROFID_IPV4_GTPC_NO_TEID: | ||||
case ICE_PROFID_IPV6_GTPC_TEID: | case ICE_PROFID_IPV6_GTPC_TEID: | ||||
case ICE_PROFID_IPV6_GTPC_NO_TEID: | case ICE_PROFID_IPV6_GTPC_NO_TEID: | ||||
return true; | return true; | ||||
default: | default: | ||||
▲ Show 20 Lines • Show All 1,044 Lines • Show Last 20 Lines |