<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/xen-netback/interface.c, branch linux-5.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-12-26T23:16:26Z</updated>
<entry>
<title>xen-netback: support dynamic unbind/bind</title>
<updated>2019-12-26T23:16:26Z</updated>
<author>
<name>Paul Durrant</name>
</author>
<published>2019-12-23T09:59:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9476654bd5e8ad42abe8ee9f9e90069ff8e60c17'/>
<id>urn:sha1:9476654bd5e8ad42abe8ee9f9e90069ff8e60c17</id>
<content type='text'>
By re-attaching RX, TX, and CTL rings during connect() rather than
assuming they are freshly allocated (i.e. assuming the counters are zero),
and avoiding forcing state to Closed in netback_remove() it is possible
for vif instances to be unbound and re-bound from and to (respectively) a
running guest.

Dynamic unbind/bind is a highly useful feature for a backend module as it
allows it to be unloaded and re-loaded (i.e. updated) without requiring
domUs to be halted.

This has been tested by running iperf as a server in the test VM and
then running a client against it in a continuous loop, whilst also
running:

while true;
  do echo vif-$DOMID-$VIF &gt;unbind;
  echo down;
  rmmod xen-netback;
  echo unloaded;
  modprobe xen-netback;
  cd $(pwd);
  brctl addif xenbr0 vif$DOMID.$VIF;
  ip link set vif$DOMID.$VIF up;
  echo up;
  sleep 5;
  done

in dom0 from /sys/bus/xen-backend/drivers/vif to continuously unbind,
unload, re-load, re-bind and re-plumb the backend.

Clearly a performance drop was seen but no TCP connection resets were
observed during this test and moreover a parallel SSH connection into the
guest remained perfectly usable throughout.

Signed-off-by: Paul Durrant &lt;pdurrant@amazon.com&gt;
Reviewed-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xen-netback: avoid race that can lead to NULL pointer dereference</title>
<updated>2019-12-15T19:40:15Z</updated>
<author>
<name>Paul Durrant</name>
</author>
<published>2019-12-13T13:20:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd42bfd1bb31f9a521be6b4f1bd89b85abc08d20'/>
<id>urn:sha1:fd42bfd1bb31f9a521be6b4f1bd89b85abc08d20</id>
<content type='text'>
In function xenvif_disconnect_queue(), the value of queue-&gt;rx_irq is
zeroed *before* queue-&gt;task is stopped. Unfortunately that task may call
notify_remote_via_irq(queue-&gt;rx_irq) and calling that function with a
zero value results in a NULL pointer dereference in evtchn_from_irq().

This patch simply re-orders things, stopping all tasks before zero-ing the
irq values, thereby avoiding the possibility of the race.

Fixes: 2ac061ce97f4 ("xen/netback: cleanup init and deinit code")
Signed-off-by: Paul Durrant &lt;pdurrant@amazon.com&gt;
Acked-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
</content>
</entry>
<entry>
<title>xen/netback: cleanup init and deinit code</title>
<updated>2019-10-22T16:52:04Z</updated>
<author>
<name>Juergen Gross</name>
</author>
<published>2019-10-21T05:30:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2ac061ce97f413bfbbdd768f7d2e0fda2e8170df'/>
<id>urn:sha1:2ac061ce97f413bfbbdd768f7d2e0fda2e8170df</id>
<content type='text'>
Do some cleanup of the netback init and deinit code:

- add an omnipotent queue deinit function usable from
  xenvif_disconnect_data() and the error path of xenvif_connect_data()
- only install the irq handlers after initializing all relevant items
  (especially the kthreads related to the queue)
- there is no need to use get_task_struct() after creating a kthread
  and using put_task_struct() again after having stopped it.
- use kthread_run() instead of kthread_create() to spare the call of
  wake_up_process().

Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Reviewed-by: Paul Durrant &lt;pdurrant@gmail.com&gt;
Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
</content>
</entry>
<entry>
<title>xen/netback: fix error path of xenvif_connect_data()</title>
<updated>2019-10-19T18:43:29Z</updated>
<author>
<name>Juergen Gross</name>
</author>
<published>2019-10-18T07:45:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d5c1a037d37392a6859afbde49be5ba6a70a6b3'/>
<id>urn:sha1:3d5c1a037d37392a6859afbde49be5ba6a70a6b3</id>
<content type='text'>
xenvif_connect_data() calls module_put() in case of error. This is
wrong as there is no related module_get().

Remove the superfluous module_put().

Fixes: 279f438e36c0a7 ("xen-netback: Don't destroy the netdev until the vif is shut down")
Cc: &lt;stable@vger.kernel.org&gt; # 3.12
Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Reviewed-by: Paul Durrant &lt;paul@xen.org&gt;
Reviewed-by: Wei Liu &lt;wei.liu@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xen-netback: remove redundant assignment to err</title>
<updated>2019-05-31T21:36:48Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2019-05-30T19:04:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=587a7126779b32a6c8983ae567d987c1a0c7a5dc'/>
<id>urn:sha1:587a7126779b32a6c8983ae567d987c1a0c7a5dc</id>
<content type='text'>
The variable err is assigned with the value -ENOMEM that is never
read and it is re-assigned a new value later on.  The assignment is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: Wei Liu &lt;wei.liu2@citrix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: remove 'fallback' argument from dev-&gt;ndo_select_queue()</title>
<updated>2019-03-20T18:18:55Z</updated>
<author>
<name>Paolo Abeni</name>
</author>
<published>2019-03-20T10:02:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a350eccee5830d9a1f29e393a88dc05a15326d44'/>
<id>urn:sha1:a350eccee5830d9a1f29e393a88dc05a15326d44</id>
<content type='text'>
After the previous patch, all the callers of ndo_select_queue()
provide as a 'fallback' argument netdev_pick_tx.
The only exceptions are nested calls to ndo_select_queue(),
which pass down the 'fallback' available in the current scope
- still netdev_pick_tx.

We can drop such argument and replace fallback() invocation with
netdev_pick_tx(). This avoids an indirect call per xmit packet
in some scenarios (TCP syn, UDP unconnected, XDP generic, pktgen)
with device drivers implementing such ndo. It also clean the code
a bit.

Tested with ixgbe and CONFIG_FCOE=m

With pktgen using queue xmit:
threads		vanilla 	patched
		(kpps)		(kpps)
1		2334		2428
2		4166		4278
4		7895		8100

 v1 -&gt; v2:
 - rebased after helper's name change

Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xen-netback: don't populate the hash cache on XenBus disconnect</title>
<updated>2019-02-28T20:50:37Z</updated>
<author>
<name>Igor Druzhinin</name>
</author>
<published>2019-02-28T14:11:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a2288d4e355992d369c50c45d017a85f6061ff71'/>
<id>urn:sha1:a2288d4e355992d369c50c45d017a85f6061ff71</id>
<content type='text'>
Occasionally, during the disconnection procedure on XenBus which
includes hash cache deinitialization there might be some packets
still in-flight on other processors. Handling of these packets includes
hashing and hash cache population that finally results in hash cache
data structure corruption.

In order to avoid this we prevent hashing of those packets if there
are no queues initialized. In that case RCU protection of queues guards
the hash cache as well.

Signed-off-by: Igor Druzhinin &lt;igor.druzhinin@citrix.com&gt;
Reviewed-by: Paul Durrant &lt;paul.durrant@citrix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2018-10-04T04:00:17Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2018-10-04T04:00:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6f41617bf23a17d9cb7cc6ca8161534f05f80293'/>
<id>urn:sha1:6f41617bf23a17d9cb7cc6ca8161534f05f80293</id>
<content type='text'>
Minor conflict in net/core/rtnetlink.c, David Ahern's bug fix in 'net'
overlapped the renaming of a netlink attribute in net-next.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: xen-netback: fix return type of ndo_start_xmit function</title>
<updated>2018-09-28T17:25:11Z</updated>
<author>
<name>YueHaibing</name>
</author>
<published>2018-09-26T09:18:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a9ca7f17c6d240e269a24cbcd76abf9a940309dd'/>
<id>urn:sha1:a9ca7f17c6d240e269a24cbcd76abf9a940309dd</id>
<content type='text'>
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.

Found by coccinelle.

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Acked-by: Wei Liu &lt;wei.liu2@citrix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>xen-netback: validate queue numbers in xenvif_set_hash_mapping()</title>
<updated>2018-09-25T17:39:34Z</updated>
<author>
<name>Jan Beulich</name>
</author>
<published>2018-09-25T08:13:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=22f9cde3401077ea450b69bf9b0bba373e12e454'/>
<id>urn:sha1:22f9cde3401077ea450b69bf9b0bba373e12e454</id>
<content type='text'>
Checking them before the grant copy means nothing as to the validity of
the incoming request. As we shouldn't make the new data live before
having validated it, introduce a second instance of the mapping array.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Reviewed-by: Paul Durrant &lt;paul.durrant@citrix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
