smc: port to bytestream2 API.