Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff1dcadb authored by Al Viro's avatar Al Viro Committed by David S. Miller
Browse files

[NET]: Split skb->csum



... into anonymous union of __wsum and __u32 (csum and csum_offset resp.)

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5b14027b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2825,7 +2825,7 @@ static inline int cas_xmit_tx_ringN(struct cas *cp, int ring,
		u64 csum_start_off, csum_stuff_off;
		u64 csum_start_off, csum_stuff_off;


		csum_start_off = (u64) (skb->h.raw - skb->data);
		csum_start_off = (u64) (skb->h.raw - skb->data);
		csum_stuff_off = (u64) ((skb->h.raw + skb->csum) - skb->data);
		csum_stuff_off = csum_start_off + skb->csum_offset;


		ctrl =  TX_DESC_CSUM_EN |
		ctrl =  TX_DESC_CSUM_EN |
			CAS_BASE(TX_DESC_CSUM_START, csum_start_off) |
			CAS_BASE(TX_DESC_CSUM_START, csum_start_off) |
+1 −1
Original line number Original line Diff line number Diff line
@@ -2826,7 +2826,7 @@ e1000_tx_csum(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
		context_desc = E1000_CONTEXT_DESC(*tx_ring, i);
		context_desc = E1000_CONTEXT_DESC(*tx_ring, i);


		context_desc->upper_setup.tcp_fields.tucss = css;
		context_desc->upper_setup.tcp_fields.tucss = css;
		context_desc->upper_setup.tcp_fields.tucso = css + skb->csum;
		context_desc->upper_setup.tcp_fields.tucso = css + skb->csum_offset;
		context_desc->upper_setup.tcp_fields.tucse = 0;
		context_desc->upper_setup.tcp_fields.tucse = 0;
		context_desc->tcp_seg_setup.data = 0;
		context_desc->tcp_seg_setup.data = 0;
		context_desc->cmd_and_length = cpu_to_le32(E1000_TXD_CMD_DEXT);
		context_desc->cmd_and_length = cpu_to_le32(E1000_TXD_CMD_DEXT);
+1 −1
Original line number Original line Diff line number Diff line
@@ -1249,7 +1249,7 @@ ixgb_tx_csum(struct ixgb_adapter *adapter, struct sk_buff *skb)
	if(likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
	if(likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
		struct ixgb_buffer *buffer_info;
		struct ixgb_buffer *buffer_info;
		css = skb->h.raw - skb->data;
		css = skb->h.raw - skb->data;
		cso = (skb->h.raw + skb->csum) - skb->data;
		cso = css + skb->csum_offset;


		i = adapter->tx_ring.next_to_use;
		i = adapter->tx_ring.next_to_use;
		context_desc = IXGB_CONTEXT_DESC(adapter->tx_ring, i);
		context_desc = IXGB_CONTEXT_DESC(adapter->tx_ring, i);
+1 −1
Original line number Original line Diff line number Diff line
@@ -1955,7 +1955,7 @@ static int myri10ge_xmit(struct sk_buff *skb, struct net_device *dev)
	flags = (MXGEFW_FLAGS_NO_TSO | MXGEFW_FLAGS_FIRST);
	flags = (MXGEFW_FLAGS_NO_TSO | MXGEFW_FLAGS_FIRST);
	if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
	if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
		cksum_offset = (skb->h.raw - skb->data);
		cksum_offset = (skb->h.raw - skb->data);
		pseudo_hdr_offset = (skb->h.raw + skb->csum) - skb->data;
		pseudo_hdr_offset = cksum_offset + skb->csum_offset;
		/* If the headers are excessively large, then we must
		/* If the headers are excessively large, then we must
		 * fall back to a software checksum */
		 * fall back to a software checksum */
		if (unlikely(cksum_offset > 255 || pseudo_hdr_offset > 127)) {
		if (unlikely(cksum_offset > 255 || pseudo_hdr_offset > 127)) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -1562,7 +1562,7 @@ struct sk_buff *pMessage) /* pointer to send-message */


	if (pMessage->ip_summed == CHECKSUM_PARTIAL) {
	if (pMessage->ip_summed == CHECKSUM_PARTIAL) {
		u16 hdrlen = pMessage->h.raw - pMessage->data;
		u16 hdrlen = pMessage->h.raw - pMessage->data;
		u16 offset = hdrlen + pMessage->csum;
		u16 offset = hdrlen + pMessage->csum_offset;


		if ((pMessage->h.ipiph->protocol == IPPROTO_UDP ) &&
		if ((pMessage->h.ipiph->protocol == IPPROTO_UDP ) &&
			(pAC->GIni.GIChipRev == 0) &&
			(pAC->GIni.GIChipRev == 0) &&
@@ -1681,7 +1681,7 @@ struct sk_buff *pMessage) /* pointer to send-message */
	*/
	*/
	if (pMessage->ip_summed == CHECKSUM_PARTIAL) {
	if (pMessage->ip_summed == CHECKSUM_PARTIAL) {
		u16 hdrlen = pMessage->h.raw - pMessage->data;
		u16 hdrlen = pMessage->h.raw - pMessage->data;
		u16 offset = hdrlen + pMessage->csum;
		u16 offset = hdrlen + pMessage->csum_offset;


		Control = BMU_STFWD;
		Control = BMU_STFWD;


Loading