Skip to content

Commit

Permalink
Staging: sxg: Use correct queue_id for transmitting non-TCP packets
Browse files Browse the repository at this point in the history
Use correct queue_id while transmitting non-TCP packets.
They should always use queue 0.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
  • Loading branch information
Mithlesh Thukral authored and Greg Kroah-Hartman committed Apr 17, 2009
1 parent 1f89513 commit 8d17e6a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/staging/sxg/sxg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2615,7 +2615,9 @@ static int sxg_dumb_sgl(struct sxg_x64_sgl *pSgl,
struct iphdr *ip;

ip = ip_hdr(skb);
if ((ip->protocol == IPPROTO_TCP)&&(DataLength >= sizeof(
if (ip->protocol != IPPROTO_TCP || !tcp_hdr(skb))
queue_id = 0;
else if ((ip->protocol == IPPROTO_TCP)&&(DataLength >= sizeof(
struct tcphdr))){
queue_id = ((ntohs(tcp_hdr(skb)->dest) == ISCSI_PORT) ?
(ntohs (tcp_hdr(skb)->source) &
Expand All @@ -2624,8 +2626,10 @@ static int sxg_dumb_sgl(struct sxg_x64_sgl *pSgl,
SXG_LARGE_SEND_QUEUE_MASK));
}
} else if (skb->protocol == htons(ETH_P_IPV6)) {
if ((ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) && (DataLength >=
sizeof(struct tcphdr)) ) {
if (ipv6_hdr(skb)->nexthdr != IPPROTO_TCP || !tcp_hdr(skb))
queue_id = 0;
else if ((ipv6_hdr(skb)->nexthdr == IPPROTO_TCP) && (DataLength
>= sizeof(struct tcphdr)) ) {
queue_id = ((ntohs(tcp_hdr(skb)->dest) == ISCSI_PORT) ?
(ntohs (tcp_hdr(skb)->source) &
SXG_LARGE_SEND_QUEUE_MASK):
Expand Down

0 comments on commit 8d17e6a

Please sign in to comment.