diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-12 00:00:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-12 15:08:42 -0800 |
commit | 78fbfd8a653ca972afe479517a40661bfff6d8c3 (patch) | |
tree | 9dccc5c16bf269d53d8499064ec95a998e84c646 /drivers/scsi/cxgbi | |
parent | 1561747ddf9d28185548687b11aae7074d6129c4 (diff) | |
download | kernel-common-78fbfd8a653ca972afe479517a40661bfff6d8c3.tar.gz kernel-common-78fbfd8a653ca972afe479517a40661bfff6d8c3.tar.bz2 kernel-common-78fbfd8a653ca972afe479517a40661bfff6d8c3.zip |
ipv4: Create and use route lookup helpers.
The idea here is this minimizes the number of places one has to edit
in order to make changes to how flows are defined and used.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi/cxgbi')
-rw-r--r-- | drivers/scsi/cxgbi/libcxgbi.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c index 889199aa1f5b..a24dff9f9163 100644 --- a/drivers/scsi/cxgbi/libcxgbi.c +++ b/drivers/scsi/cxgbi/libcxgbi.c @@ -451,26 +451,12 @@ static struct cxgbi_sock *cxgbi_sock_create(struct cxgbi_device *cdev) } static struct rtable *find_route_ipv4(__be32 saddr, __be32 daddr, - __be16 sport, __be16 dport, u8 tos) + __be16 sport, __be16 dport, u8 tos) { struct rtable *rt; - struct flowi fl = { - .oif = 0, - .nl_u = { - .ip4_u = { - .daddr = daddr, - .saddr = saddr, - .tos = tos } - }, - .proto = IPPROTO_TCP, - .uli_u = { - .ports = { - .sport = sport, - .dport = dport } - } - }; - rt = ip_route_output_flow(&init_net, &fl, NULL); + rt = ip_route_output_ports(&init_net, NULL, daddr, saddr, + dport, sport, IPPROTO_TCP, tos, 0); if (IS_ERR(rt)) return NULL; |