diff --git a/src/vnet/interface.api b/src/vnet/interface.api
index b839e89..f91af42 100644
--- a/src/vnet/interface.api
+++ b/src/vnet/interface.api
@@ -432,6 +432,24 @@
     u8 mode;
 };
 
+/** \brief Set an interface's rx-placement
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param sw_if_index - the interface whose rx-placement will be set
+    @param queue_id - the queue number whose rx-placement will be set.
+    @param worker_id - the worker number whom rx-placement will be at.
+    @param is_main - flag to set rx-placement to main thread
+*/
+autoreply define sw_interface_set_rx_placement
+{
+    u32 client_index;
+    u32 context;
+    u32 sw_if_index;
+    u32 queue_id;
+    u32 worker_id;
+    u8 is_main;
+};
+
 /* Gross kludge, DGMS */
 autoreply define interface_name_renumber
 {
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index 1d167c6..03434ea 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -56,6 +56,7 @@
 _(SW_INTERFACE_DUMP, sw_interface_dump)                         \
 _(SW_INTERFACE_ADD_DEL_ADDRESS, sw_interface_add_del_address)   \
 _(SW_INTERFACE_SET_RX_MODE, sw_interface_set_rx_mode)           \
+_(SW_INTERFACE_SET_RX_PLACEMENT, sw_interface_set_rx_placement)	\
 _(SW_INTERFACE_SET_TABLE, sw_interface_set_table)               \
 _(SW_INTERFACE_GET_TABLE, sw_interface_get_table)               \
 _(SW_INTERFACE_SET_UNNUMBERED, sw_interface_set_unnumbered)     \
@@ -936,6 +937,12 @@
   VALIDATE_SW_IF_INDEX (mp);
 
   si = vnet_get_sw_interface (vnm, sw_if_index);
+  if (si->type != VNET_SW_INTERFACE_TYPE_HARDWARE)
+    {
+      rv = VNET_API_ERROR_INVALID_VALUE;
+      goto bad_sw_if_index;
+    }
+
   error = set_hw_interface_change_rx_mode (vnm, si->hw_if_index,
 					   mp->queue_id_valid,
 					   ntohl (mp->queue_id), mp->mode);
@@ -951,6 +958,40 @@
   REPLY_MACRO (VL_API_SW_INTERFACE_SET_RX_MODE_REPLY);
 }
 
+static void vl_api_sw_interface_set_rx_placement_t_handler
+  (vl_api_sw_interface_set_rx_placement_t * mp)
+{
+  vl_api_sw_interface_set_rx_placement_reply_t *rmp;
+  vnet_main_t *vnm = vnet_get_main ();
+  u32 sw_if_index = ntohl (mp->sw_if_index);
+  vnet_sw_interface_t *si;
+  clib_error_t *error = 0;
+  int rv = 0;
+
+  VALIDATE_SW_IF_INDEX (mp);
+
+  si = vnet_get_sw_interface (vnm, sw_if_index);
+  if (si->type != VNET_SW_INTERFACE_TYPE_HARDWARE)
+    {
+      rv = VNET_API_ERROR_INVALID_VALUE;
+      goto bad_sw_if_index;
+    }
+
+  error = set_hw_interface_rx_placement (si->hw_if_index,
+					 ntohl (mp->queue_id),
+					 ntohl (mp->worker_id), mp->is_main);
+  if (error)
+    {
+      rv = VNET_API_ERROR_UNIMPLEMENTED;
+      clib_error_report (error);
+      goto out;
+    }
+
+  BAD_SW_IF_INDEX_LABEL;
+out:
+  REPLY_MACRO (VL_API_SW_INTERFACE_SET_RX_PLACEMENT_REPLY);
+}
+
 static void
 vl_api_create_vlan_subif_t_handler (vl_api_create_vlan_subif_t * mp)
 {
diff --git a/src/vnet/interface_cli.c b/src/vnet/interface_cli.c
index 91725b6..9271f5b 100644
--- a/src/vnet/interface_cli.c
+++ b/src/vnet/interface_cli.c
@@ -1565,47 +1565,20 @@
 };
 /* *INDENT-ON* */
 
-static clib_error_t *
-set_interface_rx_placement (vlib_main_t * vm, unformat_input_t * input,
-			    vlib_cli_command_t * cmd)
+clib_error_t *
+set_hw_interface_rx_placement (u32 hw_if_index, u32 queue_id,
+			       u32 thread_index, u8 is_main)
 {
-  clib_error_t *error = 0;
-  unformat_input_t _line_input, *line_input = &_line_input;
   vnet_main_t *vnm = vnet_get_main ();
   vnet_device_main_t *vdm = &vnet_device_main;
-  vnet_hw_interface_rx_mode mode;
-  u32 hw_if_index = (u32) ~ 0;
-  u32 queue_id = (u32) 0;
-  u32 thread_index = (u32) ~ 0;
+  clib_error_t *error = 0;
+  vnet_hw_interface_rx_mode mode = VNET_HW_INTERFACE_RX_MODE_UNKNOWN;
   int rv;
 
-  if (!unformat_user (input, unformat_line_input, line_input))
-    return 0;
-
-  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
-    {
-      if (unformat
-	  (line_input, "%U", unformat_vnet_hw_interface, vnm, &hw_if_index))
-	;
-      else if (unformat (line_input, "queue %d", &queue_id))
-	;
-      else if (unformat (line_input, "main", &thread_index))
-	thread_index = 0;
-      else if (unformat (line_input, "worker %d", &thread_index))
-	thread_index += vdm->first_worker_thread_index;
-      else
-	{
-	  error = clib_error_return (0, "parse error: '%U'",
-				     format_unformat_error, line_input);
-	  unformat_free (line_input);
-	  return error;
-	}
-    }
-
-  unformat_free (line_input);
-
-  if (hw_if_index == (u32) ~ 0)
-    return clib_error_return (0, "please specify valid interface name");
+  if (is_main)
+    thread_index = 0;
+  else
+    thread_index += vdm->first_worker_thread_index;
 
   if (thread_index > vdm->last_worker_thread_index)
     return clib_error_return (0,
@@ -1625,7 +1598,53 @@
 				      thread_index);
   vnet_hw_interface_set_rx_mode (vnm, hw_if_index, queue_id, mode);
 
-  return 0;
+  return (error);
+}
+
+static clib_error_t *
+set_interface_rx_placement (vlib_main_t * vm, unformat_input_t * input,
+			    vlib_cli_command_t * cmd)
+{
+  clib_error_t *error = 0;
+  unformat_input_t _line_input, *line_input = &_line_input;
+  vnet_main_t *vnm = vnet_get_main ();
+  u32 hw_if_index = (u32) ~ 0;
+  u32 queue_id = (u32) 0;
+  u32 thread_index = (u32) ~ 0;
+  u8 is_main = 0;
+
+  if (!unformat_user (input, unformat_line_input, line_input))
+    return 0;
+
+  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat
+	  (line_input, "%U", unformat_vnet_hw_interface, vnm, &hw_if_index))
+	;
+      else if (unformat (line_input, "queue %d", &queue_id))
+	;
+      else if (unformat (line_input, "main", &thread_index))
+	is_main = 1;
+      else if (unformat (line_input, "worker %d", &thread_index))
+	;
+      else
+	{
+	  error = clib_error_return (0, "parse error: '%U'",
+				     format_unformat_error, line_input);
+	  unformat_free (line_input);
+	  return error;
+	}
+    }
+
+  unformat_free (line_input);
+
+  if (hw_if_index == (u32) ~ 0)
+    return clib_error_return (0, "please specify valid interface name");
+
+  error = set_hw_interface_rx_placement (hw_if_index, queue_id, thread_index,
+					 is_main);
+
+  return (error);
 }
 
 /*?
diff --git a/src/vnet/interface_funcs.h b/src/vnet/interface_funcs.h
index a8a41e3..557ed14 100644
--- a/src/vnet/interface_funcs.h
+++ b/src/vnet/interface_funcs.h
@@ -354,6 +354,10 @@
 					       vnet_hw_interface_rx_mode
 					       mode);
 
+/* Set rx-placement on the interface */
+clib_error_t *set_hw_interface_rx_placement (u32 hw_if_index, u32 queue_id,
+					     u32 thread_index, u8 is_main);
+
 /* Set the MTU on the HW interface */
 void vnet_hw_interface_set_mtu (vnet_main_t * vnm, u32 hw_if_index, u32 mtu);
 
