mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-19 09:39:24 +07:00
Staging: bcm: Qos.c: Line length / Whitespace cleanup in IpVersion4()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5fb136700d
commit
a21a3fe440
@ -280,41 +280,78 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter,
|
|||||||
struct bcm_transport_header *xprt_hdr = NULL;
|
struct bcm_transport_header *xprt_hdr = NULL;
|
||||||
bool bClassificationSucceed = false;
|
bool bClassificationSucceed = false;
|
||||||
|
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "========>");
|
BCM_DEBUG_PRINT(Adapter,
|
||||||
|
DBG_TYPE_TX,
|
||||||
|
IPV4_DBG,
|
||||||
|
DBG_LVL_ALL,
|
||||||
|
"========>");
|
||||||
|
|
||||||
xprt_hdr = (struct bcm_transport_header *)((PUCHAR)iphd + sizeof(struct iphdr));
|
xprt_hdr = (struct bcm_transport_header *)((PUCHAR)iphd + sizeof(struct iphdr));
|
||||||
|
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Trying to see Direction = %d %d",
|
BCM_DEBUG_PRINT(Adapter,
|
||||||
|
DBG_TYPE_TX,
|
||||||
|
IPV4_DBG,
|
||||||
|
DBG_LVL_ALL,
|
||||||
|
"Trying to see Direction = %d %d",
|
||||||
pstClassifierRule->ucDirection,
|
pstClassifierRule->ucDirection,
|
||||||
pstClassifierRule->usVCID_Value);
|
pstClassifierRule->usVCID_Value);
|
||||||
|
|
||||||
/* Checking classifier validity */
|
/* Checking classifier validity */
|
||||||
if (!pstClassifierRule->bUsed || pstClassifierRule->ucDirection == DOWNLINK_DIR)
|
if (!pstClassifierRule->bUsed ||
|
||||||
|
pstClassifierRule->ucDirection == DOWNLINK_DIR)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "is IPv6 check!");
|
BCM_DEBUG_PRINT(Adapter,
|
||||||
|
DBG_TYPE_TX,
|
||||||
|
IPV4_DBG,
|
||||||
|
DBG_LVL_ALL,
|
||||||
|
"is IPv6 check!");
|
||||||
if (pstClassifierRule->bIpv6Protocol)
|
if (pstClassifierRule->bIpv6Protocol)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* Checking IP header parameter */
|
/* Checking IP header parameter */
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Trying to match Source IP Address");
|
BCM_DEBUG_PRINT(Adapter,
|
||||||
|
DBG_TYPE_TX,
|
||||||
|
IPV4_DBG,
|
||||||
|
DBG_LVL_ALL,
|
||||||
|
"Trying to match Source IP Address");
|
||||||
if (!MatchSrcIpAddress(pstClassifierRule, iphd->saddr))
|
if (!MatchSrcIpAddress(pstClassifierRule, iphd->saddr))
|
||||||
goto out;
|
goto out;
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Source IP Address Matched");
|
BCM_DEBUG_PRINT(Adapter,
|
||||||
|
DBG_TYPE_TX,
|
||||||
|
IPV4_DBG,
|
||||||
|
DBG_LVL_ALL,
|
||||||
|
"Source IP Address Matched");
|
||||||
|
|
||||||
if (!MatchDestIpAddress(pstClassifierRule, iphd->daddr))
|
if (!MatchDestIpAddress(pstClassifierRule, iphd->daddr))
|
||||||
goto out;
|
goto out;
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Destination IP Address Matched");
|
BCM_DEBUG_PRINT(Adapter,
|
||||||
|
DBG_TYPE_TX,
|
||||||
|
IPV4_DBG,
|
||||||
|
DBG_LVL_ALL,
|
||||||
|
"Destination IP Address Matched");
|
||||||
|
|
||||||
if (!MatchTos(pstClassifierRule, iphd->tos)) {
|
if (!MatchTos(pstClassifierRule, iphd->tos)) {
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "TOS Match failed\n");
|
BCM_DEBUG_PRINT(Adapter,
|
||||||
|
DBG_TYPE_TX,
|
||||||
|
IPV4_DBG,
|
||||||
|
DBG_LVL_ALL,
|
||||||
|
"TOS Match failed\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "TOS Matched");
|
BCM_DEBUG_PRINT(Adapter,
|
||||||
|
DBG_TYPE_TX,
|
||||||
|
IPV4_DBG,
|
||||||
|
DBG_LVL_ALL,
|
||||||
|
"TOS Matched");
|
||||||
|
|
||||||
if (!MatchProtocol(pstClassifierRule, iphd->protocol))
|
if (!MatchProtocol(pstClassifierRule, iphd->protocol))
|
||||||
goto out;
|
goto out;
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Protocol Matched");
|
BCM_DEBUG_PRINT(Adapter,
|
||||||
|
DBG_TYPE_TX,
|
||||||
|
IPV4_DBG,
|
||||||
|
DBG_LVL_ALL,
|
||||||
|
"Protocol Matched");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* if protocol is not TCP or UDP then no
|
* if protocol is not TCP or UDP then no
|
||||||
@ -325,18 +362,31 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
/* Checking Transport Layer Header field if present */
|
/* Checking Transport Layer Header field if present */
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Source Port %04x",
|
BCM_DEBUG_PRINT(Adapter,
|
||||||
|
DBG_TYPE_TX,
|
||||||
|
IPV4_DBG,
|
||||||
|
DBG_LVL_ALL,
|
||||||
|
"Source Port %04x",
|
||||||
(iphd->protocol == UDP) ? xprt_hdr->uhdr.source : xprt_hdr->thdr.source);
|
(iphd->protocol == UDP) ? xprt_hdr->uhdr.source : xprt_hdr->thdr.source);
|
||||||
|
|
||||||
if (!MatchSrcPort(pstClassifierRule,
|
if (!MatchSrcPort(pstClassifierRule,
|
||||||
ntohs((iphd->protocol == UDP) ?
|
ntohs((iphd->protocol == UDP) ?
|
||||||
xprt_hdr->uhdr.source : xprt_hdr->thdr.source)))
|
xprt_hdr->uhdr.source : xprt_hdr->thdr.source)))
|
||||||
goto out;
|
goto out;
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Src Port Matched");
|
BCM_DEBUG_PRINT(Adapter,
|
||||||
|
DBG_TYPE_TX,
|
||||||
|
IPV4_DBG,
|
||||||
|
DBG_LVL_ALL,
|
||||||
|
"Src Port Matched");
|
||||||
|
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Destination Port %04x",
|
BCM_DEBUG_PRINT(Adapter,
|
||||||
|
DBG_TYPE_TX,
|
||||||
|
IPV4_DBG,
|
||||||
|
DBG_LVL_ALL,
|
||||||
|
"Destination Port %04x",
|
||||||
(iphd->protocol == UDP) ? xprt_hdr->uhdr.dest :
|
(iphd->protocol == UDP) ? xprt_hdr->uhdr.dest :
|
||||||
xprt_hdr->thdr.dest);
|
xprt_hdr->thdr.dest);
|
||||||
|
|
||||||
if (!MatchDestPort(pstClassifierRule,
|
if (!MatchDestPort(pstClassifierRule,
|
||||||
ntohs((iphd->protocol == UDP) ?
|
ntohs((iphd->protocol == UDP) ?
|
||||||
xprt_hdr->uhdr.dest : xprt_hdr->thdr.dest)))
|
xprt_hdr->uhdr.dest : xprt_hdr->thdr.dest)))
|
||||||
@ -346,15 +396,19 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter,
|
|||||||
out:
|
out:
|
||||||
if (TRUE == bClassificationSucceed) {
|
if (TRUE == bClassificationSucceed) {
|
||||||
INT iMatchedSFQueueIndex = 0;
|
INT iMatchedSFQueueIndex = 0;
|
||||||
|
iMatchedSFQueueIndex =
|
||||||
iMatchedSFQueueIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID);
|
SearchSfid(Adapter, pstClassifierRule->ulSFID);
|
||||||
if (iMatchedSFQueueIndex >= NO_OF_QUEUES)
|
if (iMatchedSFQueueIndex >= NO_OF_QUEUES)
|
||||||
bClassificationSucceed = false;
|
bClassificationSucceed = false;
|
||||||
else if (false == Adapter->PackInfo[iMatchedSFQueueIndex].bActive)
|
else if (false == Adapter->PackInfo[iMatchedSFQueueIndex].bActive)
|
||||||
bClassificationSucceed = false;
|
bClassificationSucceed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "IpVersion4 <==========");
|
BCM_DEBUG_PRINT(Adapter,
|
||||||
|
DBG_TYPE_TX,
|
||||||
|
IPV4_DBG,
|
||||||
|
DBG_LVL_ALL,
|
||||||
|
"IpVersion4 <==========");
|
||||||
|
|
||||||
return bClassificationSucceed;
|
return bClassificationSucceed;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user