gbuf: implement submission logic