Skip to content

Commit c2335d6

Browse files
committed
Merge branch 's390-next'
Julian Wiedmann says: ==================== s390/net: updates 2018-04-26 please apply the following patches to net-next. There's the usual cleanups & small improvements, and Kittipon adds HW offload support for IPv6 checksumming. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents d8fb164 + 21b1702 commit c2335d6

File tree

7 files changed

+229
-292
lines changed

7 files changed

+229
-292
lines changed

drivers/s390/net/lcs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1928,6 +1928,8 @@ lcs_portno_store (struct device *dev, struct device_attribute *attr, const char
19281928
return -EINVAL;
19291929
/* TODO: sanity checks */
19301930
card->portno = value;
1931+
if (card->dev)
1932+
card->dev->dev_port = card->portno;
19311933

19321934
return count;
19331935

@@ -2158,6 +2160,7 @@ lcs_new_device(struct ccwgroup_device *ccwgdev)
21582160
card->dev = dev;
21592161
card->dev->ml_priv = card;
21602162
card->dev->netdev_ops = &lcs_netdev_ops;
2163+
card->dev->dev_port = card->portno;
21612164
memcpy(card->dev->dev_addr, card->mac, LCS_MAC_LENGTH);
21622165
#ifdef CONFIG_IP_MULTICAST
21632166
if (!lcs_check_multicast_support(card))

drivers/s390/net/qeth_core.h

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ struct qeth_perf_stats {
148148
unsigned int tx_csum;
149149
unsigned int tx_lin;
150150
unsigned int tx_linfail;
151+
unsigned int rx_csum;
151152
};
152153

153154
/* Routing stuff */
@@ -712,9 +713,6 @@ enum qeth_discipline_id {
712713

713714
struct qeth_discipline {
714715
const struct device_type *devtype;
715-
void (*start_poll)(struct ccw_device *, int, unsigned long);
716-
qdio_handler_t *input_handler;
717-
qdio_handler_t *output_handler;
718716
int (*process_rx_buffer)(struct qeth_card *card, int budget, int *done);
719717
int (*recover)(void *ptr);
720718
int (*setup) (struct ccwgroup_device *);
@@ -780,9 +778,9 @@ struct qeth_card {
780778
struct qeth_card_options options;
781779

782780
wait_queue_head_t wait_q;
783-
spinlock_t vlanlock;
784781
spinlock_t mclock;
785782
unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
783+
struct mutex vid_list_mutex; /* vid_list */
786784
struct list_head vid_list;
787785
DECLARE_HASHTABLE(mac_htable, 4);
788786
DECLARE_HASHTABLE(ip_htable, 4);
@@ -867,6 +865,32 @@ static inline int qeth_get_ip_version(struct sk_buff *skb)
867865
}
868866
}
869867

868+
static inline void qeth_rx_csum(struct qeth_card *card, struct sk_buff *skb,
869+
u8 flags)
870+
{
871+
if ((card->dev->features & NETIF_F_RXCSUM) &&
872+
(flags & QETH_HDR_EXT_CSUM_TRANSP_REQ)) {
873+
skb->ip_summed = CHECKSUM_UNNECESSARY;
874+
if (card->options.performance_stats)
875+
card->perf_stats.rx_csum++;
876+
} else {
877+
skb->ip_summed = CHECKSUM_NONE;
878+
}
879+
}
880+
881+
static inline void qeth_tx_csum(struct sk_buff *skb, u8 *flags, int ipv)
882+
{
883+
*flags |= QETH_HDR_EXT_CSUM_TRANSP_REQ;
884+
if ((ipv == 4 && ip_hdr(skb)->protocol == IPPROTO_UDP) ||
885+
(ipv == 6 && ipv6_hdr(skb)->nexthdr == IPPROTO_UDP))
886+
*flags |= QETH_HDR_EXT_UDP;
887+
if (ipv == 4) {
888+
/* some HW requires combined L3+L4 csum offload: */
889+
*flags |= QETH_HDR_EXT_CSUM_HDR_REQ;
890+
ip_hdr(skb)->check = 0;
891+
}
892+
}
893+
870894
static inline void qeth_put_buffer_pool_entry(struct qeth_card *card,
871895
struct qeth_buffer_pool_entry *entry)
872896
{
@@ -879,6 +903,27 @@ static inline int qeth_is_diagass_supported(struct qeth_card *card,
879903
return card->info.diagass_support & (__u32)cmd;
880904
}
881905

906+
int qeth_send_simple_setassparms_prot(struct qeth_card *card,
907+
enum qeth_ipa_funcs ipa_func,
908+
u16 cmd_code, long data,
909+
enum qeth_prot_versions prot);
910+
/* IPv4 variant */
911+
static inline int qeth_send_simple_setassparms(struct qeth_card *card,
912+
enum qeth_ipa_funcs ipa_func,
913+
u16 cmd_code, long data)
914+
{
915+
return qeth_send_simple_setassparms_prot(card, ipa_func, cmd_code,
916+
data, QETH_PROT_IPV4);
917+
}
918+
919+
static inline int qeth_send_simple_setassparms_v6(struct qeth_card *card,
920+
enum qeth_ipa_funcs ipa_func,
921+
u16 cmd_code, long data)
922+
{
923+
return qeth_send_simple_setassparms_prot(card, ipa_func, cmd_code,
924+
data, QETH_PROT_IPV6);
925+
}
926+
882927
extern struct qeth_discipline qeth_l2_discipline;
883928
extern struct qeth_discipline qeth_l3_discipline;
884929
extern const struct attribute_group *qeth_generic_attr_groups[];
@@ -921,13 +966,7 @@ struct sk_buff *qeth_core_get_next_skb(struct qeth_card *,
921966
struct qeth_qdio_buffer *, struct qdio_buffer_element **, int *,
922967
struct qeth_hdr **);
923968
void qeth_schedule_recovery(struct qeth_card *);
924-
void qeth_qdio_start_poll(struct ccw_device *, int, unsigned long);
925969
int qeth_poll(struct napi_struct *napi, int budget);
926-
void qeth_qdio_input_handler(struct ccw_device *,
927-
unsigned int, unsigned int, int,
928-
int, unsigned long);
929-
void qeth_qdio_output_handler(struct ccw_device *, unsigned int,
930-
int, int, int, unsigned long);
931970
void qeth_clear_ipacmd_list(struct qeth_card *);
932971
int qeth_qdio_clear_card(struct qeth_card *, int);
933972
void qeth_clear_working_pool_list(struct qeth_card *);
@@ -979,8 +1018,6 @@ int qeth_hw_trap(struct qeth_card *, enum qeth_diags_trap_action);
9791018
int qeth_query_ipassists(struct qeth_card *, enum qeth_prot_versions prot);
9801019
void qeth_trace_features(struct qeth_card *);
9811020
void qeth_close_dev(struct qeth_card *);
982-
int qeth_send_simple_setassparms(struct qeth_card *, enum qeth_ipa_funcs,
983-
__u16, long);
9841021
int qeth_send_setassparms(struct qeth_card *, struct qeth_cmd_buffer *, __u16,
9851022
long,
9861023
int (*reply_cb)(struct qeth_card *,

0 commit comments

Comments
 (0)