diff options
| author | “yangwei” <[email protected]> | 2019-09-16 15:18:10 +0800 |
|---|---|---|
| committer | “yangwei” <[email protected]> | 2019-09-16 15:18:10 +0800 |
| commit | 8735f7ffa446e0c6d43fe725c1f9cce09185feb0 (patch) | |
| tree | 13f6a1693c05742d44613113dc6bbc84cac2117f | |
| parent | f0f5d0fe5d05216107e4e42b1d9afcd8acf5e27b (diff) | |
phydev_setup时增加参数检查,确认设备指定的core_id是否在service->iocores中定义v4.3.15-20190916-alpha
| -rw-r--r-- | service/src/phydev.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/service/src/phydev.c b/service/src/phydev.c index 1ff8af2..c9ead8d 100644 --- a/service/src/phydev.c +++ b/service/src/phydev.c @@ -262,6 +262,13 @@ static int phydev_setup(struct sc_main * sc, } else { + if (!CPU_ISSET(dev->core_id, &sc->cpu_set)) + { + MR_ERROR("Physical device %s setup failed: illegal core bind" + " core %d not set in service->iocore", + dev->symbol, dev->core_id); + return RT_ERR; + } dev->nr_rxq = 1; dev->nr_txq = 1; } |
