oce_queue.c (247880) | oce_queue.c (252869) |
---|---|
1/*- | 1/*- |
2 * Copyright (C) 2012 Emulex | 2 * Copyright (C) 2013 Emulex |
3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright notice, 9 * this list of conditions and the following disclaimer. 10 * --- 22 unchanged lines hidden (view full) --- 33 * 34 * Emulex 35 * 3333 Susan Street 36 * Costa Mesa, CA 92626 37 */ 38 39 40 | 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright notice, 9 * this list of conditions and the following disclaimer. 10 * --- 22 unchanged lines hidden (view full) --- 33 * 34 * Emulex 35 * 3333 Susan Street 36 * Costa Mesa, CA 92626 37 */ 38 39 40 |
41/* $FreeBSD: head/sys/dev/oce/oce_queue.c 247880 2013-03-06 09:53:38Z delphij $ */ | 41/* $FreeBSD: head/sys/dev/oce/oce_queue.c 252869 2013-07-06 08:30:45Z delphij $ */ |
42 43 44#include "oce_if.h" 45 46/***************************************************** 47 * local queue functions 48 *****************************************************/ 49 --- 51 unchanged lines hidden (view full) --- 101 if (!sc->wq[i]) 102 goto error; 103 104 } 105 106 for_all_rq_queues(sc, rq, i) { 107 sc->rq[i] = oce_rq_init(sc, sc->rx_ring_size, sc->rq_frag_size, 108 OCE_MAX_JUMBO_FRAME_SIZE, | 42 43 44#include "oce_if.h" 45 46/***************************************************** 47 * local queue functions 48 *****************************************************/ 49 --- 51 unchanged lines hidden (view full) --- 101 if (!sc->wq[i]) 102 goto error; 103 104 } 105 106 for_all_rq_queues(sc, rq, i) { 107 sc->rq[i] = oce_rq_init(sc, sc->rx_ring_size, sc->rq_frag_size, 108 OCE_MAX_JUMBO_FRAME_SIZE, |
109 (i == 0) ? 0 : sc->rss_enable); | 109 (i == 0) ? 0 : is_rss_enabled(sc)); |
110 if (!sc->rq[i]) 111 goto error; 112 } 113 114 /* Create network interface on card */ 115 if (oce_create_nw_interface(sc)) 116 goto error; 117 --- 1102 unchanged lines hidden (view full) --- 1220 rq->ring->pidx = 0; 1221 rq->packets_in = 0; 1222 rq->packets_out = 0; 1223 } 1224 1225 DELAY(1); 1226 1227 /* RSS config */ | 110 if (!sc->rq[i]) 111 goto error; 112 } 113 114 /* Create network interface on card */ 115 if (oce_create_nw_interface(sc)) 116 goto error; 117 --- 1102 unchanged lines hidden (view full) --- 1220 rq->ring->pidx = 0; 1221 rq->packets_in = 0; 1222 rq->packets_out = 0; 1223 } 1224 1225 DELAY(1); 1226 1227 /* RSS config */ |
1228 if (sc->rss_enable) { | 1228 if (is_rss_enabled(sc)) { |
1229 rc = oce_config_nic_rss(sc, (uint8_t) sc->if_id, RSS_ENABLE); 1230 if (rc) 1231 goto error; 1232 1233 } 1234 1235 return rc; 1236error: 1237 device_printf(sc->dev, "Start RX failed\n"); 1238 return rc; 1239 1240} 1241 1242 1243 | 1229 rc = oce_config_nic_rss(sc, (uint8_t) sc->if_id, RSS_ENABLE); 1230 if (rc) 1231 goto error; 1232 1233 } 1234 1235 return rc; 1236error: 1237 device_printf(sc->dev, "Start RX failed\n"); 1238 return rc; 1239 1240} 1241 1242 1243 |