multipath-tcp / mptcp

⚠️⚠️⚠️ Deprecated 🚫 Out-of-tree Linux Kernel implementation of MultiPath TCP. 👉 Use https://github.com/multipath-tcp/mptcp_net-next repo instead ⚠️⚠️⚠️
https://github.com/multipath-tcp/mptcp_net-next
Other
887 stars 334 forks source link

MPTCP_SCHED_INFO #498

Closed yuyujunjiang closed 1 year ago

yuyujunjiang commented 1 year ago

Hello I read others code recently and found a macro named MPTCP_SCHED_INFO which I have never seen and there is nothing in linux/tcp.h. As the author writes, the function can "set num of segments in all mptcp subflows". Does the function work? If it does, how I define it.

static PyObject* set_seg(PyObject* self, PyObject* args)
{
  PyObject * listObj;
  if (! PyArg_ParseTuple( args, "O", &listObj ))
    return NULL;

  long length = PyList_Size(listObj);
  int fd = (int)PyLong_AsLong(PyList_GetItem(listObj, 0));
  int i;

  struct mptcp_sched_info sched_info;
  sched_info.len = length-1;
  unsigned char quota[NUM_SUBFLOWS];
  unsigned char segments[NUM_SUBFLOWS];

  sched_info.quota = &quota;
  sched_info.num_segments = &segments;

  for(i=1; i<length; i++) {
    PyObject* temp = PyList_GetItem(listObj, i);
    long elem = PyLong_AsLong(temp);

    segments[i-1] = (unsigned char) elem;
  }

  setsockopt(fd, SOL_TCP, MPTCP_SCHED_INFO, &sched_info, sizeof(sched_info));

  return Py_BuildValue("i", fd);
}
matttbe commented 1 year ago

Hi,

Where did you find this code? We don't support any MPTCP_SCHED_INFO socket option. I guess this has been added in an experimental kernel and the code has never been proposed here.

yuyujunjiang commented 1 year ago

(https://github.com/kallen666/MPTCP-Deep-Reinforcement-Learning) In mpsched.c, function static PyObject* set_seg(PyObject* self, PyObject* args). The whole repository is to achieve data schedule by deep reinforce learning.

matttbe commented 1 year ago

It looks like they modified this kernel to access to more data but they didn't send any patches here. The best is to contact them to get access to the modifications they did in the Linux kernel.

In other words, sorry, I cannot help.